]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
Test for GET on empty database
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / Controller / WallabagRestControllerTest.php
1 <?php
2
3 namespace Wallabag\CoreBundle\Tests\Controller;
4
5 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7 class WallabagRestControllerTest extends WebTestCase
8 {
9 public function testEmptyGetEntries() {
10 $client = $this->createClient();
11 $client->request('GET', '/api/entries');
12 $this->assertTrue($client->getResponse()->isOk());
13
14 $this->assertTrue(
15 $client->getResponse()->headers->contains(
16 'Content-Type',
17 'application/json'
18 )
19 );
20 $this->assertEquals('[]', $client->getResponse()->getContent());
21 }
22 }