]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
write test for version
authorVincent <vincentbechu@gmail.com>
Mon, 7 Mar 2016 14:16:27 +0000 (15:16 +0100)
committerVincent <vincentbechu@gmail.com>
Mon, 7 Mar 2016 14:16:27 +0000 (15:16 +0100)
src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php

index 630b75bfe62adb2bbd21d387635e8613a027a587..f42c0f5709ece397c2f43be12f21a44728302134 100644 (file)
@@ -336,4 +336,15 @@ class WallabagRestControllerTest extends WallabagApiTestCase
 
         $this->assertCount(0, $entries);
     }
+
+    public function testGetVersion(){
+        
+        $this->client->request('GET','/api/version');
+
+        $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
+
+        $content = json_decode($this->client->getResponse()->getContent(), true);
+
+        $this->assertEquals($this->client->getContainer()->getParameter('wallabag_core.version'),$content);
+    }
 }