]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | ||
3 | namespace Tests\Wallabag\ApiBundle\Controller; | |
4 | ||
5 | use Tests\Wallabag\ApiBundle\WallabagApiTestCase; | |
6 | ||
7 | class WallabagRestControllerTest extends WallabagApiTestCase | |
8 | { | |
9 | public function testGetVersion() | |
10 | { | |
11 | // create a new client instead of using $this->client to be sure client isn't authenticated | |
12 | $client = static::createClient(); | |
13 | $client->request('GET', '/api/version'); | |
14 | ||
15 | $this->assertSame(200, $client->getResponse()->getStatusCode()); | |
16 | ||
17 | $content = json_decode($client->getResponse()->getContent(), true); | |
18 | ||
19 | $this->assertSame($client->getContainer()->getParameter('wallabag_core.version'), $content); | |
20 | } | |
21 | } |