aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
index 7b02f85c..ee66c728 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
@@ -90,7 +90,7 @@ class EntryFilterType extends AbstractType
90 if (strlen($value) <= 2 || empty($value)) { 90 if (strlen($value) <= 2 || empty($value)) {
91 return; 91 return;
92 } 92 }
93 $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); 93 $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->lower($filterQuery->getExpr()->literal('%'.$value.'%')));
94 94
95 return $filterQuery->createCondition($expression); 95 return $filterQuery->createCondition($expression);
96 }, 96 },
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index 952e8957..c347cca5 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -725,6 +725,15 @@ class EntryControllerTest extends WallabagCoreTestCase
725 $crawler = $client->submit($form, $data); 725 $crawler = $client->submit($form, $data);
726 $this->assertCount(5, $crawler->filter('div[class=entry]')); 726 $this->assertCount(5, $crawler->filter('div[class=entry]'));
727 727
728 $crawler = $client->request('GET', '/unread/list');
729 $form = $crawler->filter('button[id=submit-filter]')->form();
730 $data = [
731 'entry_filter[domainName]' => 'dOmain',
732 ];
733
734 $crawler = $client->submit($form, $data);
735 $this->assertCount(5, $crawler->filter('div[class=entry]'));
736
728 $form = $crawler->filter('button[id=submit-filter]')->form(); 737 $form = $crawler->filter('button[id=submit-filter]')->form();
729 $data = [ 738 $data = [
730 'entry_filter[domainName]' => 'wallabag', 739 'entry_filter[domainName]' => 'wallabag',