aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Filter/EntryFilterType.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php13
2 files changed, 14 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
index 11c69abd..de95eed9 100644
--- a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
+++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
@@ -45,9 +45,7 @@ class EntryFilterType extends AbstractType
45 ->add('isStarred', 'filter_checkbox') 45 ->add('isStarred', 'filter_checkbox')
46 ->add('previewPicture', 'filter_checkbox', array( 46 ->add('previewPicture', 'filter_checkbox', array(
47 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { 47 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
48 $value = $values['value']; 48 if (false === $values['value']) {
49
50 if (false === $value) {
51 return; 49 return;
52 } 50 }
53 51
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index a0966285..5798009c 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -369,4 +369,17 @@ class EntryControllerTest extends WallabagCoreTestCase
369 $crawler = $client->submit($form); 369 $crawler = $client->submit($form);
370 $this->assertCount(1, $crawler->filter('div[class=entry]')); 370 $this->assertCount(1, $crawler->filter('div[class=entry]'));
371 } 371 }
372
373 public function testPreviewPictureFilter()
374 {
375 $this->logInAs('admin');
376 $client = $this->getClient();
377
378 $crawler = $client->request('GET', '/unread/list');
379 $form = $crawler->filter('button[id=submit-filter]')->form();
380 $form['entry_filter[previewPicture]']->tick();
381
382 $crawler = $client->submit($form);
383 $this->assertCount(1, $crawler->filter('div[class=entry]'));
384 }
372} 385}