Fixes for tests
This commit is contained in:
parent
f5c812d1a3
commit
bb85d1d21c
|
|
@ -1047,6 +1047,9 @@ class Client extends BaseModel implements HasLocalePreference
|
|||
public function checkDeliveryNetwork(): ?string
|
||||
{
|
||||
|
||||
if(!isset($this->country->iso_3166_2))
|
||||
return "Client has no country set!";
|
||||
|
||||
$br = new \App\DataMapper\Tax\BaseRule();
|
||||
|
||||
$government_countries = array_merge($br->peppol_business_countries, $br->peppol_government_countries);
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ class EInvoiceValidationTest extends TestCase
|
|||
'company_id' => $company->id,
|
||||
'classification' => 'individual',
|
||||
'vat_number' => '',
|
||||
'country_id' => 1,
|
||||
'country_id' => 276,
|
||||
'address1' => '10 Wallaby Way',
|
||||
'address2' => '',
|
||||
'city' => 'Sydney',
|
||||
|
|
@ -383,6 +383,9 @@ class EInvoiceValidationTest extends TestCase
|
|||
$el = new EntityLevel();
|
||||
$validation = $el->checkClient($client);
|
||||
|
||||
if(!$validation['passes'])
|
||||
nlog($validation);
|
||||
|
||||
$this->assertTrue($validation['passes']);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue