X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FApiBundle%2FController%2FWallabagRestControllerTest.php;h=ac4d6cdcfe2b61644667d2a8ce55f1da180cfd5b;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=c87e58de0d3fac350277290f9227e20cf08a0304;hpb=900c844861eac95fc41afbbbc121584b8f9e6c32;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php index c87e58de..ac4d6cdc 100644 --- a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php @@ -8,12 +8,14 @@ class WallabagRestControllerTest extends WallabagApiTestCase { public function testGetVersion() { - $this->client->request('GET', '/api/version'); + // create a new client instead of using $this->client to be sure client isn't authenticated + $client = static::createClient(); + $client->request('GET', '/api/version'); - $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + $this->assertSame(200, $client->getResponse()->getStatusCode()); - $content = json_decode($this->client->getResponse()->getContent(), true); + $content = json_decode($client->getResponse()->getContent(), true); - $this->assertEquals($this->client->getContainer()->getParameter('wallabag_core.version'), $content); + $this->assertSame($client->getContainer()->getParameter('wallabag_core.version'), $content); } }