From 9761bfa18e7a481ce9d73c1650e77bccab1927b3 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 7 Mar 2016 15:16:27 +0100 Subject: write test for version --- .../ApiBundle/Tests/Controller/WallabagRestControllerTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php index 630b75bf..f42c0f57 100644 --- a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php @@ -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); + } } -- cgit v1.2.3