aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ApiBundle
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ApiBundle')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php2
-rw-r--r--tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php2
-rw-r--r--tests/Wallabag/ApiBundle/WallabagApiTestCase.php4
3 files changed, 5 insertions, 3 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php
index f58d1c12..090155d7 100644
--- a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php
@@ -121,7 +121,7 @@ class DeveloperControllerTest extends WallabagCoreTestCase
121 { 121 {
122 $client = $this->getClient(); 122 $client = $this->getClient();
123 $em = $client->getContainer()->get('doctrine.orm.entity_manager'); 123 $em = $client->getContainer()->get('doctrine.orm.entity_manager');
124 $userManager = $client->getContainer()->get('fos_user.user_manager'); 124 $userManager = $client->getContainer()->get('fos_user.user_manager.test');
125 $user = $userManager->findUserBy(['username' => $username]); 125 $user = $userManager->findUserBy(['username' => $username]);
126 $apiClient = new Client($user); 126 $apiClient = new Client($user);
127 $apiClient->setName('My app'); 127 $apiClient->setName('My app');
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
index 58b617f3..6b26376d 100644
--- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
@@ -438,6 +438,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
438 $this->assertSame(0, $content['is_archived']); 438 $this->assertSame(0, $content['is_archived']);
439 $this->assertSame(0, $content['is_starred']); 439 $this->assertSame(0, $content['is_starred']);
440 $this->assertNull($content['starred_at']); 440 $this->assertNull($content['starred_at']);
441 $this->assertNull($content['archived_at']);
441 $this->assertSame('New title for my article', $content['title']); 442 $this->assertSame('New title for my article', $content['title']);
442 $this->assertSame(1, $content['user_id']); 443 $this->assertSame(1, $content['user_id']);
443 $this->assertCount(2, $content['tags']); 444 $this->assertCount(2, $content['tags']);
@@ -533,6 +534,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
533 $this->assertSame(1, $content['is_archived']); 534 $this->assertSame(1, $content['is_archived']);
534 $this->assertSame(1, $content['is_starred']); 535 $this->assertSame(1, $content['is_starred']);
535 $this->assertGreaterThanOrEqual($now->getTimestamp(), (new \DateTime($content['starred_at']))->getTimestamp()); 536 $this->assertGreaterThanOrEqual($now->getTimestamp(), (new \DateTime($content['starred_at']))->getTimestamp());
537 $this->assertGreaterThanOrEqual($now->getTimestamp(), (new \DateTime($content['archived_at']))->getTimestamp());
536 $this->assertSame(1, $content['user_id']); 538 $this->assertSame(1, $content['user_id']);
537 } 539 }
538 540
diff --git a/tests/Wallabag/ApiBundle/WallabagApiTestCase.php b/tests/Wallabag/ApiBundle/WallabagApiTestCase.php
index 8a188e1c..0c52aea0 100644
--- a/tests/Wallabag/ApiBundle/WallabagApiTestCase.php
+++ b/tests/Wallabag/ApiBundle/WallabagApiTestCase.php
@@ -31,9 +31,9 @@ abstract class WallabagApiTestCase extends WebTestCase
31 $container = $client->getContainer(); 31 $container = $client->getContainer();
32 32
33 /** @var $userManager \FOS\UserBundle\Doctrine\UserManager */ 33 /** @var $userManager \FOS\UserBundle\Doctrine\UserManager */
34 $userManager = $container->get('fos_user.user_manager'); 34 $userManager = $container->get('fos_user.user_manager.test');
35 /** @var $loginManager \FOS\UserBundle\Security\LoginManager */ 35 /** @var $loginManager \FOS\UserBundle\Security\LoginManager */
36 $loginManager = $container->get('fos_user.security.login_manager'); 36 $loginManager = $container->get('fos_user.security.login_manager.test');
37 $firewallName = $container->getParameter('fos_user.firewall_name'); 37 $firewallName = $container->getParameter('fos_user.firewall_name');
38 38
39 $this->user = $userManager->findUserBy(['username' => 'admin']); 39 $this->user = $userManager->findUserBy(['username' => 'admin']);