]>
Commit | Line | Data |
---|---|---|
68c6f1bd NL |
1 | <?php |
2 | ||
3 | namespace Wallabag\CoreBundle\Tests\Controller; | |
4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
6 | ||
7 | class WallabagRestControllerTest extends WebTestCase | |
8 | { | |
f5deb024 NL |
9 | public function testGetSalt() |
10 | { | |
11 | $client = $this->createClient(); | |
12 | $client->request('GET', '/api/salts/admin.json'); | |
13 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | |
14 | ||
15 | $client->request('GET', '/api/salts/notfound.json'); | |
16 | $this->assertEquals(404, $client->getResponse()->getStatusCode()); | |
17 | } | |
18 | ||
19 | public function testEmptyGetEntries() | |
20 | { | |
68c6f1bd NL |
21 | $client = $this->createClient(); |
22 | $client->request('GET', '/api/entries'); | |
23 | $this->assertTrue($client->getResponse()->isOk()); | |
24 | ||
25 | $this->assertTrue( | |
26 | $client->getResponse()->headers->contains( | |
27 | 'Content-Type', | |
28 | 'application/json' | |
29 | ) | |
30 | ); | |
31 | $this->assertEquals('[]', $client->getResponse()->getContent()); | |
32 | } | |
f5deb024 | 33 | } |