aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-06 18:02:12 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-11 06:27:04 +0100
commit68c6f1bd7fbf2f01730ee38b1291251494c80eb0 (patch)
tree2afe043c910cd90b5b48c6438a7738ca695cd60c
parentf59f45d74093e92656f9717c8c5f4e37c56d2173 (diff)
downloadwallabag-68c6f1bd7fbf2f01730ee38b1291251494c80eb0.tar.gz
wallabag-68c6f1bd7fbf2f01730ee38b1291251494c80eb0.tar.zst
wallabag-68c6f1bd7fbf2f01730ee38b1291251494c80eb0.zip
Test for GET on empty database
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
new file mode 100644
index 00000000..0949b92d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -0,0 +1,22 @@
1<?php
2
3namespace Wallabag\CoreBundle\Tests\Controller;
4
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7class 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} \ No newline at end of file