write test for version

This commit is contained in:
Vincent 2016-03-07 15:16:27 +01:00
parent 2b4770301c
commit 9761bfa18e

View 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);
}
}