diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml index 3bf0fbca..b75196a3 100644 --- a/config/packages/doctrine_migrations.yaml +++ b/config/packages/doctrine_migrations.yaml @@ -1,5 +1,5 @@ doctrine_migrations: - dir_name: '%kernel.project_dir%/src/Migrations' - # namespace is arbitrary but should be different from App\Migrations - # as migrations classes should NOT be autoloaded - namespace: DoctrineMigrations + migrations_paths: + # namespace is arbitrary but should be different from App\Migrations + # as migrations classes should NOT be autoloaded + 'DoctrineMigrations': '%kernel.project_dir%/src/Migrations' diff --git a/tests/Controller/ControllerBaseTest.php b/tests/Controller/ControllerBaseTest.php index f13f20cc..91ddfb60 100644 --- a/tests/Controller/ControllerBaseTest.php +++ b/tests/Controller/ControllerBaseTest.php @@ -28,12 +28,16 @@ abstract class ControllerBaseTest extends WebTestCase public const DEFAULT_LANGUAGE = 'en'; protected function tearDown(): void + { + $this->clearConfigCache(); + parent::tearDown(); + } + + protected function clearConfigCache() { /** @var ConfigurationRepository $repository */ $repository = static::$kernel->getContainer()->get(ConfigurationRepository::class); $repository->clearCache(); - - parent::tearDown(); } protected function getClientForAuthenticatedUser(string $role = User::ROLE_USER): HttpKernelBrowser diff --git a/tests/Controller/TimesheetControllerTest.php b/tests/Controller/TimesheetControllerTest.php index 30e3ff51..87d1edb3 100644 --- a/tests/Controller/TimesheetControllerTest.php +++ b/tests/Controller/TimesheetControllerTest.php @@ -320,8 +320,6 @@ class TimesheetControllerTest extends ControllerBaseTest ] ]); - $client = $this->getClientForAuthenticatedUser(); - $begin = new \DateTime('2018-08-02T20:00:00'); $end = new \DateTime('2018-08-02T20:30:00'); @@ -331,7 +329,7 @@ class TimesheetControllerTest extends ControllerBaseTest $timesheet->setEnd($end); }); $fixture->setAmount(1); - $fixture->setUser($this->getUserByRole(User::ROLE_USER)); + $fixture->setUser($this->getUserByRole(User::ROLE_SUPER_ADMIN)); $this->importFixture($fixture); // create a second entry that is overlapping - should fail due to the changed config above diff --git a/tests/DataFixtures/InvoiceFixtures.php b/tests/DataFixtures/InvoiceFixtures.php index b924c66d..9abfe0f3 100644 --- a/tests/DataFixtures/InvoiceFixtures.php +++ b/tests/DataFixtures/InvoiceFixtures.php @@ -53,6 +53,7 @@ class InvoiceFixtures extends Fixture 'Phone: ' . $faker->phoneNumber . PHP_EOL . 'Email: ' . $faker->safeEmail ) + ->setLanguage('en') ; $manager->persist($template);