mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Search by term: extend to entries url
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
8a098044bf
commit
eac09b48b0
2 changed files with 26 additions and 1 deletions
|
@ -1093,5 +1093,29 @@ class EntryControllerTest extends WallabagCoreTestCase
|
|||
$crawler = $client->submit($form, $data);
|
||||
|
||||
$this->assertCount(0, $crawler->filter('div[class=entry]'));
|
||||
|
||||
// test url search on list of all articles
|
||||
$crawler = $client->request('GET', '/all/list');
|
||||
|
||||
$form = $crawler->filter('form[name=search]')->form();
|
||||
$data = [
|
||||
'search_entry[term]' => 'domain', // the search will match an entry with 'domain' in its url
|
||||
];
|
||||
|
||||
$crawler = $client->submit($form, $data);
|
||||
|
||||
$this->assertCount(1, $crawler->filter('div[class=entry]'));
|
||||
|
||||
// same as previous test but for case-sensitivity
|
||||
$crawler = $client->request('GET', '/all/list');
|
||||
|
||||
$form = $crawler->filter('form[name=search]')->form();
|
||||
$data = [
|
||||
'search_entry[term]' => 'doMain', // the search will match an entry with 'domain' in its url
|
||||
];
|
||||
|
||||
$crawler = $client->submit($form, $data);
|
||||
|
||||
$this->assertCount(1, $crawler->filter('div[class=entry]'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue