From ab2c93c7eb644f89c01793be2b9f097943b3b791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 17 Aug 2015 15:15:51 +0200 Subject: add test --- .../Tests/Controller/EntryControllerTest.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/Wallabag/CoreBundle/Tests/Controller') diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index 24848eb2..0bd18c44 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php @@ -259,4 +259,26 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertCount(1, $crawler->filter('div[class=entry]')); } + + public function testPaginationWithFilter() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/config'); + + $form = $crawler->filter('button[id=config_save]')->form(); + + $data = array( + 'config[items_per_page]' => '1', + ); + + $client->submit($form, $data); + + $parameters = '?entry_filter%5BreadingTime%5D%5Bleft_number%5D=&entry_filter%5BreadingTime%5D%5Bright_number%5D='; + + $crawler = $client->request('GET', 'unread/list'.$parameters); + + $this->assertContains($parameters, $client->getResponse()->getContent()); + } } -- cgit v1.2.3