]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
return id of article instead of true if entry exists
[github/wallabag/wallabag.git] / tests / Wallabag / ApiBundle / Controller / EntryRestControllerTest.php
index 3c8b7980001175f5c434519ea70b8928a955a035..dc5160c7a0badebea65f41f951db0ce7f8326b6d 100644 (file)
@@ -642,7 +642,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
 
         $content = json_decode($this->client->getResponse()->getContent(), true);
 
-        $this->assertEquals(true, $content['exists']);
+        $this->assertEquals(2, $content['exists']);
     }
 
     public function testGetEntriesExistsWithManyUrls()
@@ -657,7 +657,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
 
         $this->assertArrayHasKey($url1, $content);
         $this->assertArrayHasKey($url2, $content);
-        $this->assertEquals(true, $content[$url1]);
+        $this->assertEquals(2, $content[$url1]);
         $this->assertEquals(false, $content[$url2]);
     }
 
@@ -681,10 +681,9 @@ class EntryRestControllerTest extends WallabagApiTestCase
 
     public function testReloadEntryErrorWhileFetching()
     {
-        $entry = $this->client->getContainer()
-            ->get('doctrine.orm.entity_manager')
+        $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager')
             ->getRepository('WallabagCoreBundle:Entry')
-            ->findOneBy(['user' => 1, 'isArchived' => false]);
+            ->findByUrlAndUserId('http://0.0.0.0/entry4', 1);
 
         if (!$entry) {
             $this->markTestSkipped('No content found in db.');