]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
fix tests for GET /entries/tags
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / Controller / WallabagRestControllerTest.php
index 044485376780709117682a59c48128ee54280a3d..c45e52d782be5218f31faded99473a4a4642b778 100644 (file)
@@ -44,10 +44,6 @@ class WallabagRestControllerTest extends WallabagTestCase
     public function testWithBadHeaders()
     {
         $client = $this->createClient();
-        $client->request('GET', '/api/salts/admin.json');
-        $salt = json_decode($client->getResponse()->getContent());
-
-        $headers = $this->generateHeaders('admin', 'mypassword', $salt[0]);
 
         $entry = $client->getContainer()
             ->get('doctrine.orm.entity_manager')
@@ -163,7 +159,7 @@ class WallabagRestControllerTest extends WallabagTestCase
             ->getRepository('WallabagCoreBundle:Entry')
             ->findOneWithTags(1);
 
-        var_dump($entry->getTitle());
+        $entry = $entry[0];
 
         if (!$entry) {
             $this->markTestSkipped('No content found in db.');
@@ -176,7 +172,7 @@ class WallabagRestControllerTest extends WallabagTestCase
 
         $client->request('GET', '/api/entries/'.$entry->getId().'/tags', array(), array(), $headers);
 
-        $this->assertEquals(json_encode($tags), $client->getResponse()->getContent());
+        $this->assertEquals(json_encode($tags, JSON_HEX_QUOT), $client->getResponse()->getContent());
     }
 
     public function testPostTagsOnEntry()