From 443cecd2d895a7e257a051ea65c6822fdce73b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 18 Aug 2015 17:28:12 +0200 Subject: add filter on domain name --- .../Tests/Controller/EntryControllerTest.php | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Tests') diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index 87c16415..8d013ec0 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php @@ -293,7 +293,6 @@ class EntryControllerTest extends WallabagCoreTestCase { $this->logInAs('admin'); $client = $this->getClient(); - $crawler = $client->request('GET', '/config'); $form = $crawler->filter('button[id=config_save]')->form(); @@ -310,4 +309,27 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertContains($parameters, $client->getResponse()->getContent()); } + + public function testFilterOnDomainName() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/unread/list'); + $form = $crawler->filter('button[id=submit-filter]')->form(); + $data = array( + 'entry_filter[domainName]' => 'monde' + ); + + $crawler = $client->submit($form, $data); + $this->assertCount(1, $crawler->filter('div[class=entry]')); + + $form = $crawler->filter('button[id=submit-filter]')->form(); + $data = array( + 'entry_filter[domainName]' => 'wallabag' + ); + + $crawler = $client->submit($form, $data); + $this->assertCount(0, $crawler->filter('div[class=entry]')); + } } -- cgit v1.2.3