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

Use test container to replace test services definitions

This commit is contained in:
Yassine Guedidi 2024-02-24 02:34:03 +01:00
parent 742742f67d
commit a221ec8348
7 changed files with 16 additions and 32 deletions

View file

@ -5,6 +5,7 @@ namespace Tests\Wallabag\Controller;
use Doctrine\ORM\EntityManagerInterface;
use Tests\Wallabag\WallabagTestCase;
use Wallabag\Entity\Entry;
use Wallabag\Repository\UserRepository;
class ExportControllerTest extends WallabagTestCase
{
@ -328,11 +329,9 @@ class ExportControllerTest extends WallabagTestCase
private function setUpForJsonExportFromSearch()
{
$client = $this->getTestClient();
$em = $this->getEntityManager();
$userRepository = $client->getContainer()
->get('wallabag_user.user_repository.test');
$userRepository = static::getContainer()->get(UserRepository::class);
$user = $userRepository->findOneByUserName('admin');
$this->adminEntry = new Entry($user);