mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 10:22:14 +01:00
Merge pull request #2654 from Kdecherf/domain-filter
Enforce lowercase on domain name filter
This commit is contained in:
commit
5b644798a0
@ -90,7 +90,7 @@ class EntryFilterType extends AbstractType
|
||||
if (strlen($value) <= 2 || empty($value)) {
|
||||
return;
|
||||
}
|
||||
$expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%'));
|
||||
$expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->lower($filterQuery->getExpr()->literal('%'.$value.'%')));
|
||||
|
||||
return $filterQuery->createCondition($expression);
|
||||
},
|
||||
|
@ -725,6 +725,15 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->submit($form, $data);
|
||||
$this->assertCount(5, $crawler->filter('div[class=entry]'));
|
||||
|
||||
$crawler = $client->request('GET', '/unread/list');
|
||||
$form = $crawler->filter('button[id=submit-filter]')->form();
|
||||
$data = [
|
||||
'entry_filter[domainName]' => 'dOmain',
|
||||
];
|
||||
|
||||
$crawler = $client->submit($form, $data);
|
||||
$this->assertCount(5, $crawler->filter('div[class=entry]'));
|
||||
|
||||
$form = $crawler->filter('button[id=submit-filter]')->form();
|
||||
$data = [
|
||||
'entry_filter[domainName]' => 'wallabag',
|
||||
|
Loading…
Reference in New Issue
Block a user