aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-10-24 20:11:45 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-01-22 20:42:25 +0100
commit019e1acc4962229a538421b6f2b0643d03c1d72c (patch)
tree2d7cb5a5a1908e4db4b17c1cfe405d437928a469 /tests/Wallabag
parent9133bd02d11c37c98b2c7c979e363cc7bff8f914 (diff)
downloadwallabag-019e1acc4962229a538421b6f2b0643d03c1d72c.tar.gz
wallabag-019e1acc4962229a538421b6f2b0643d03c1d72c.tar.zst
wallabag-019e1acc4962229a538421b6f2b0643d03c1d72c.zip
Factorize sendResponse between Api controllers
And run newer cs fixer
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php
index f096f21b..fd524639 100644
--- a/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php
@@ -3,7 +3,6 @@
3namespace Tests\Wallabag\ApiBundle\Controller; 3namespace Tests\Wallabag\ApiBundle\Controller;
4 4
5use Tests\Wallabag\ApiBundle\WallabagApiTestCase; 5use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
6use Wallabag\CoreBundle\Entity\Entry;
7 6
8class SearchRestControllerTest extends WallabagApiTestCase 7class SearchRestControllerTest extends WallabagApiTestCase
9{ 8{
@@ -19,7 +18,7 @@ class SearchRestControllerTest extends WallabagApiTestCase
19 18
20 $content = json_decode($this->client->getResponse()->getContent(), true); 19 $content = json_decode($this->client->getResponse()->getContent(), true);
21 20
22 $this->assertGreaterThanOrEqual(1, count($content)); 21 $this->assertGreaterThanOrEqual(1, \count($content));
23 $this->assertArrayHasKey('items', $content['_embedded']); 22 $this->assertArrayHasKey('items', $content['_embedded']);
24 $this->assertGreaterThanOrEqual(0, $content['total']); 23 $this->assertGreaterThanOrEqual(0, $content['total']);
25 $this->assertSame(1, $content['page']); 24 $this->assertSame(1, $content['page']);
@@ -49,7 +48,7 @@ class SearchRestControllerTest extends WallabagApiTestCase
49 48
50 $content = json_decode($this->client->getResponse()->getContent(), true); 49 $content = json_decode($this->client->getResponse()->getContent(), true);
51 50
52 $this->assertGreaterThanOrEqual(1, count($content)); 51 $this->assertGreaterThanOrEqual(1, \count($content));
53 $this->assertArrayHasKey('items', $content['_embedded']); 52 $this->assertArrayHasKey('items', $content['_embedded']);
54 $this->assertGreaterThanOrEqual(0, $content['total']); 53 $this->assertGreaterThanOrEqual(0, $content['total']);
55 $this->assertSame(1, $content['page']); 54 $this->assertSame(1, $content['page']);