]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
write test for version
[github/wallabag/wallabag.git] / 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);
+    }
 }