fix deprecations (#2225)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
doctrine_migrations:
|
doctrine_migrations:
|
||||||
dir_name: '%kernel.project_dir%/src/Migrations'
|
migrations_paths:
|
||||||
# namespace is arbitrary but should be different from App\Migrations
|
# namespace is arbitrary but should be different from App\Migrations
|
||||||
# as migrations classes should NOT be autoloaded
|
# as migrations classes should NOT be autoloaded
|
||||||
namespace: DoctrineMigrations
|
'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'
|
||||||
|
|||||||
@@ -28,12 +28,16 @@ abstract class ControllerBaseTest extends WebTestCase
|
|||||||
public const DEFAULT_LANGUAGE = 'en';
|
public const DEFAULT_LANGUAGE = 'en';
|
||||||
|
|
||||||
protected function tearDown(): void
|
protected function tearDown(): void
|
||||||
|
{
|
||||||
|
$this->clearConfigCache();
|
||||||
|
parent::tearDown();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function clearConfigCache()
|
||||||
{
|
{
|
||||||
/** @var ConfigurationRepository $repository */
|
/** @var ConfigurationRepository $repository */
|
||||||
$repository = static::$kernel->getContainer()->get(ConfigurationRepository::class);
|
$repository = static::$kernel->getContainer()->get(ConfigurationRepository::class);
|
||||||
$repository->clearCache();
|
$repository->clearCache();
|
||||||
|
|
||||||
parent::tearDown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getClientForAuthenticatedUser(string $role = User::ROLE_USER): HttpKernelBrowser
|
protected function getClientForAuthenticatedUser(string $role = User::ROLE_USER): HttpKernelBrowser
|
||||||
|
|||||||
@@ -320,8 +320,6 @@ class TimesheetControllerTest extends ControllerBaseTest
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$client = $this->getClientForAuthenticatedUser();
|
|
||||||
|
|
||||||
$begin = new \DateTime('2018-08-02T20:00:00');
|
$begin = new \DateTime('2018-08-02T20:00:00');
|
||||||
$end = new \DateTime('2018-08-02T20:30:00');
|
$end = new \DateTime('2018-08-02T20:30:00');
|
||||||
|
|
||||||
@@ -331,7 +329,7 @@ class TimesheetControllerTest extends ControllerBaseTest
|
|||||||
$timesheet->setEnd($end);
|
$timesheet->setEnd($end);
|
||||||
});
|
});
|
||||||
$fixture->setAmount(1);
|
$fixture->setAmount(1);
|
||||||
$fixture->setUser($this->getUserByRole(User::ROLE_USER));
|
$fixture->setUser($this->getUserByRole(User::ROLE_SUPER_ADMIN));
|
||||||
$this->importFixture($fixture);
|
$this->importFixture($fixture);
|
||||||
|
|
||||||
// create a second entry that is overlapping - should fail due to the changed config above
|
// create a second entry that is overlapping - should fail due to the changed config above
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class InvoiceFixtures extends Fixture
|
|||||||
'Phone: ' . $faker->phoneNumber . PHP_EOL .
|
'Phone: ' . $faker->phoneNumber . PHP_EOL .
|
||||||
'Email: ' . $faker->safeEmail
|
'Email: ' . $faker->safeEmail
|
||||||
)
|
)
|
||||||
|
->setLanguage('en')
|
||||||
;
|
;
|
||||||
|
|
||||||
$manager->persist($template);
|
$manager->persist($template);
|
||||||
|
|||||||
Reference in New Issue
Block a user