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:
parent
742742f67d
commit
a221ec8348
7 changed files with 16 additions and 32 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue