3 namespace Wallabag\CoreBundle\Tests\Controller
;
5 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase
;
7 class WallabagRestControllerTest
extends WebTestCase
9 public function testGetSalt()
11 $client = $this->createClient();
12 $client->request('GET', '/api/salts/admin.json');
13 $this->assertEquals(200, $client->getResponse()->getStatusCode());
15 $client->request('GET', '/api/salts/notfound.json');
16 $this->assertEquals(404, $client->getResponse()->getStatusCode());
19 public function testEmptyGetEntries()
21 $client = $this->createClient();
22 $client->request('GET', '/api/entries');
23 $this->assertTrue($client->getResponse()->isOk());
26 $client->getResponse()->headers
->contains(
31 $this->assertEquals('[]', $client->getResponse()->getContent());