diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-06-06 15:25:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-06 15:25:05 +0200 |
commit | 6ed2627bb35561e32d702fbe67247349dd67453e (patch) | |
tree | 75d8c130d26f0591fe858cd9eacf6b97aed4af7e /tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php | |
parent | 9fe87bc2e20fa95573287a61ef9798cc15648187 (diff) | |
parent | 438329be467d77595f549da48a6b49f38ece9b55 (diff) | |
download | wallabag-6ed2627bb35561e32d702fbe67247349dd67453e.tar.gz wallabag-6ed2627bb35561e32d702fbe67247349dd67453e.tar.zst wallabag-6ed2627bb35561e32d702fbe67247349dd67453e.zip |
Merge pull request #3177 from wallabag/api-create-user-update
API user creation behing a toggle
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 | } |