1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Migrate getRepository with entities

This commit is contained in:
Yassine Guedidi 2022-08-25 21:37:10 +02:00
parent 50a941d8b4
commit 8b7b4975d6
38 changed files with 226 additions and 202 deletions

View file

@ -50,7 +50,7 @@ class ExportControllerTest extends WallabagCoreTestCase
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->getRepository(Entry::class)
->findOneByUsernameAndNotArchived('admin');
$client->request('GET', '/export/' . $content->getId() . '.doc');
@ -91,7 +91,7 @@ class ExportControllerTest extends WallabagCoreTestCase
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->getRepository(Entry::class)
->findOneByUsernameAndNotArchived('admin');
ob_start();
@ -159,7 +159,7 @@ class ExportControllerTest extends WallabagCoreTestCase
// to be sure results are the same
$contentInDB = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->getRepository(Entry::class)
->createQueryBuilder('e')
->select('e, t')
->leftJoin('e.user', 'u')
@ -205,7 +205,7 @@ class ExportControllerTest extends WallabagCoreTestCase
$contentInDB = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->getRepository(Entry::class)
->findByUrlAndUserId('http://0.0.0.0/entry1', $this->getLoggedInUserId());
ob_start();
@ -279,7 +279,7 @@ class ExportControllerTest extends WallabagCoreTestCase
// to be sure results are the same
$contentInDB = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->getRepository(Entry::class)
->createQueryBuilder('e')
->leftJoin('e.user', 'u')
->where('u.username = :username')->setParameter('username', 'admin')