aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-10 20:07:55 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-11 06:27:04 +0100
commitf5deb024a2dd5a2cb27263a51f4653609407597e (patch)
tree83e2761fbbd64182bb9598148e2ee3835c039594
parent68c6f1bd7fbf2f01730ee38b1291251494c80eb0 (diff)
downloadwallabag-f5deb024a2dd5a2cb27263a51f4653609407597e.tar.gz
wallabag-f5deb024a2dd5a2cb27263a51f4653609407597e.tar.zst
wallabag-f5deb024a2dd5a2cb27263a51f4653609407597e.zip
add test for api/salts
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php1
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php15
2 files changed, 13 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index b6f86707..bedc90d2 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -2,7 +2,6 @@
2 2
3namespace Wallabag\CoreBundle\Repository; 3namespace Wallabag\CoreBundle\Repository;
4 4
5use Doctrine\ORM\Query;
6use Doctrine\ORM\EntityRepository; 5use Doctrine\ORM\EntityRepository;
7use Doctrine\ORM\Tools\Pagination\Paginator; 6use Doctrine\ORM\Tools\Pagination\Paginator;
8 7
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
index 0949b92d..d9e6a161 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -6,7 +6,18 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6 6
7class WallabagRestControllerTest extends WebTestCase 7class WallabagRestControllerTest extends WebTestCase
8{ 8{
9 public function testEmptyGetEntries() { 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 {
10 $client = $this->createClient(); 21 $client = $this->createClient();
11 $client->request('GET', '/api/entries'); 22 $client->request('GET', '/api/entries');
12 $this->assertTrue($client->getResponse()->isOk()); 23 $this->assertTrue($client->getResponse()->isOk());
@@ -19,4 +30,4 @@ class WallabagRestControllerTest extends WebTestCase
19 ); 30 );
20 $this->assertEquals('[]', $client->getResponse()->getContent()); 31 $this->assertEquals('[]', $client->getResponse()->getContent());
21 } 32 }
22} \ No newline at end of file 33}