1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Upgrade to Symfony 4.4

- disable autowiring for Event (because the Entry entity was injected)
- rename `getClient()` for test to `getTestClient()` to avoid error while overriding (from `BrowserKitAssertionsTrait`)
This commit is contained in:
Jeremy Benoist 2022-11-23 17:09:32 +01:00
parent 655ec5e07a
commit aa5c7f05b8
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
43 changed files with 966 additions and 1239 deletions

View file

@ -25,7 +25,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
{
parent::setUp();
$userRepository = $this->getClient()->getContainer()->get('wallabag_user.user_repository.test');
$userRepository = $this->getTestClient()->getContainer()->get('wallabag_user.user_repository.test');
$user = $userRepository->findOneByUserName('admin');
$this->adminEntry = new Entry($user);
@ -49,7 +49,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
*/
public function testRunReloadEntryCommand()
{
$application = new Application($this->getClient()->getKernel());
$application = new Application($this->getTestClient()->getKernel());
$command = $application->find('wallabag:entry:reload');
$tester = new CommandTester($command);
@ -57,7 +57,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
'interactive' => false,
]);
$reloadedEntries = $this->getClient()
$reloadedEntries = $this->getTestClient()
->getContainer()
->get('wallabag_core.entry_repository.test')
->findById([$this->adminEntry->getId(), $this->bobEntry->getId()]);
@ -74,7 +74,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
*/
public function testRunReloadEntryWithUsernameCommand()
{
$application = new Application($this->getClient()->getKernel());
$application = new Application($this->getTestClient()->getKernel());
$command = $application->find('wallabag:entry:reload');
$tester = new CommandTester($command);
@ -84,7 +84,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
'interactive' => false,
]);
$entryRepository = $this->getClient()->getContainer()->get('wallabag_core.entry_repository.test');
$entryRepository = $this->getTestClient()->getContainer()->get('wallabag_core.entry_repository.test');
$reloadedAdminEntry = $entryRepository->find($this->adminEntry->getId());
$this->assertNotEmpty($reloadedAdminEntry->getContent());
@ -97,7 +97,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
public function testRunReloadEntryWithoutEntryCommand()
{
$application = new Application($this->getClient()->getKernel());
$application = new Application($this->getTestClient()->getKernel());
$command = $application->find('wallabag:entry:reload');
$tester = new CommandTester($command);