aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-08-18 17:28:12 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-08-19 14:27:00 +0200
commit443cecd2d895a7e257a051ea65c6822fdce73b07 (patch)
tree80dcb197a59534f231354455a4a7913bea029392 /src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
parentb71ebd9af90458a4631e987676e3ee3d84c16f9e (diff)
downloadwallabag-443cecd2d895a7e257a051ea65c6822fdce73b07.tar.gz
wallabag-443cecd2d895a7e257a051ea65c6822fdce73b07.tar.zst
wallabag-443cecd2d895a7e257a051ea65c6822fdce73b07.zip
add filter on domain name
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php24
1 files changed, 23 insertions, 1 deletions
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
293 { 293 {
294 $this->logInAs('admin'); 294 $this->logInAs('admin');
295 $client = $this->getClient(); 295 $client = $this->getClient();
296
297 $crawler = $client->request('GET', '/config'); 296 $crawler = $client->request('GET', '/config');
298 297
299 $form = $crawler->filter('button[id=config_save]')->form(); 298 $form = $crawler->filter('button[id=config_save]')->form();
@@ -310,4 +309,27 @@ class EntryControllerTest extends WallabagCoreTestCase
310 309
311 $this->assertContains($parameters, $client->getResponse()->getContent()); 310 $this->assertContains($parameters, $client->getResponse()->getContent());
312 } 311 }
312
313 public function testFilterOnDomainName()
314 {
315 $this->logInAs('admin');
316 $client = $this->getClient();
317
318 $crawler = $client->request('GET', '/unread/list');
319 $form = $crawler->filter('button[id=submit-filter]')->form();
320 $data = array(
321 'entry_filter[domainName]' => 'monde'
322 );
323
324 $crawler = $client->submit($form, $data);
325 $this->assertCount(1, $crawler->filter('div[class=entry]'));
326
327 $form = $crawler->filter('button[id=submit-filter]')->form();
328 $data = array(
329 'entry_filter[domainName]' => 'wallabag'
330 );
331
332 $crawler = $client->submit($form, $data);
333 $this->assertCount(0, $crawler->filter('div[class=entry]'));
334 }
313} 335}