]> git.immae.eu Git - github/wallabag/wallabag.git/blob - tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php
ac4d6cdcfe2b61644667d2a8ce55f1da180cfd5b
[github/wallabag/wallabag.git] / tests / Wallabag / ApiBundle / Controller / WallabagRestControllerTest.php
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 }