X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FApiBundle%2FController%2FSearchRestControllerTest.php;h=fd5246393b31536d8a516fa7e0610c36d3c93d99;hb=019e1acc4962229a538421b6f2b0643d03c1d72c;hp=5900ae53bf87716cd6a84e85507ebc96eb9d9935;hpb=b32057980e33e7ddd93480017496a589006b8260;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php index 5900ae53..fd524639 100644 --- a/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/SearchRestControllerTest.php @@ -3,10 +3,6 @@ namespace Tests\Wallabag\ApiBundle\Controller; use Tests\Wallabag\ApiBundle\WallabagApiTestCase; -use Wallabag\CoreBundle\Entity\Entry; -use Wallabag\CoreBundle\Entity\Tag; -use Wallabag\CoreBundle\Helper\ContentProxy; -use Wallabag\UserBundle\Entity\User; class SearchRestControllerTest extends WallabagApiTestCase { @@ -15,14 +11,14 @@ class SearchRestControllerTest extends WallabagApiTestCase $this->client->request('GET', '/api/search', [ 'page' => 1, 'perPage' => 2, - 'term' => 'entry' // 6 results + 'term' => 'entry', // 6 results ]); $this->assertSame(200, $this->client->getResponse()->getStatusCode()); $content = json_decode($this->client->getResponse()->getContent(), true); - $this->assertGreaterThanOrEqual(1, count($content)); + $this->assertGreaterThanOrEqual(1, \count($content)); $this->assertArrayHasKey('items', $content['_embedded']); $this->assertGreaterThanOrEqual(0, $content['total']); $this->assertSame(1, $content['page']); @@ -45,14 +41,14 @@ class SearchRestControllerTest extends WallabagApiTestCase public function testGetSearchWithNoLimit() { $this->client->request('GET', '/api/search', [ - 'term' => 'entry' + 'term' => 'entry', ]); $this->assertSame(200, $this->client->getResponse()->getStatusCode()); $content = json_decode($this->client->getResponse()->getContent(), true); - $this->assertGreaterThanOrEqual(1, count($content)); + $this->assertGreaterThanOrEqual(1, \count($content)); $this->assertArrayHasKey('items', $content['_embedded']); $this->assertGreaterThanOrEqual(0, $content['total']); $this->assertSame(1, $content['page']);