diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-10-24 20:11:45 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-01-22 20:42:25 +0100 |
commit | 019e1acc4962229a538421b6f2b0643d03c1d72c (patch) | |
tree | 2d7cb5a5a1908e4db4b17c1cfe405d437928a469 /tests/Wallabag/ApiBundle/Controller | |
parent | 9133bd02d11c37c98b2c7c979e363cc7bff8f914 (diff) | |
download | wallabag-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/ApiBundle/Controller')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php | 5 |
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 @@ | |||
3 | namespace Tests\Wallabag\ApiBundle\Controller; | 3 | namespace Tests\Wallabag\ApiBundle\Controller; |
4 | 4 | ||
5 | use Tests\Wallabag\ApiBundle\WallabagApiTestCase; | 5 | use Tests\Wallabag\ApiBundle\WallabagApiTestCase; |
6 | use Wallabag\CoreBundle\Entity\Entry; | ||
7 | 6 | ||
8 | class SearchRestControllerTest extends WallabagApiTestCase | 7 | class 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']); |