diff options
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php index c87e58de..df638e8f 100644 --- a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php | |||
@@ -8,12 +8,14 @@ class WallabagRestControllerTest extends WallabagApiTestCase | |||
8 | { | 8 | { |
9 | public function testGetVersion() | 9 | public function testGetVersion() |
10 | { | 10 | { |
11 | $this->client->request('GET', '/api/version'); | 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'); | ||
12 | 14 | ||
13 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); | 15 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
14 | 16 | ||
15 | $content = json_decode($this->client->getResponse()->getContent(), true); | 17 | $content = json_decode($client->getResponse()->getContent(), true); |
16 | 18 | ||
17 | $this->assertEquals($this->client->getContainer()->getParameter('wallabag_core.version'), $content); | 19 | $this->assertEquals($client->getContainer()->getParameter('wallabag_core.version'), $content); |
18 | } | 20 | } |
19 | } | 21 | } |