Merge pull request #6162 from turbo124/v5-develop

Minor fixes for tests
This commit is contained in:
David Bomba 2021-06-29 20:15:05 +10:00 committed by GitHub
commit 5fb05179ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -45,9 +45,9 @@ class EntityCreatedObject
/* Init a new copy of the translator*/ /* Init a new copy of the translator*/
$t = app('translator'); $t = app('translator');
/* Set the locale*/ /* Set the locale*/
App::setLocale($this->company->getLocale()); App::setLocale($this->entity->company->getLocale());
/* Set customized translations _NOW_ */ /* Set customized translations _NOW_ */
$t->replace(Ninja::transformTranslations($this->company->settings)); $t->replace(Ninja::transformTranslations($this->entity->company->settings));
$this->contact = $this->entity->invitations()->first()->contact; $this->contact = $this->entity->invitations()->first()->contact;
$this->company = $this->entity->company; $this->company = $this->entity->company;

View File

@ -97,6 +97,7 @@ class CompanyLedgerTest extends TestCase
$settings->vat_number = 'vat number'; $settings->vat_number = 'vat number';
$settings->id_number = 'id number'; $settings->id_number = 'id number';
$settings->timezone_id = '1'; $settings->timezone_id = '1';
$settings->language_id = '1';
$this->company->settings = $settings; $this->company->settings = $settings;
$this->company->save(); $this->company->save();