diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2017-02-02 21:39:28 +0100 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2017-02-16 21:47:52 +0100 |
commit | eac09b48b08f5cbc0d219da000026c38a265583a (patch) | |
tree | 64096c61cc5b501a94f9b124f7a0fd6ce7dfa003 /tests/Wallabag | |
parent | 8a098044bfbe00fa2bd08b01a6d19871b03f28b7 (diff) | |
download | wallabag-eac09b48b08f5cbc0d219da000026c38a265583a.tar.gz wallabag-eac09b48b08f5cbc0d219da000026c38a265583a.tar.zst wallabag-eac09b48b08f5cbc0d219da000026c38a265583a.zip |
Search by term: extend to entries url
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'tests/Wallabag')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 06ed2db6..3eb6d47f 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | |||
@@ -1093,5 +1093,29 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
1093 | $crawler = $client->submit($form, $data); | 1093 | $crawler = $client->submit($form, $data); |
1094 | 1094 | ||
1095 | $this->assertCount(0, $crawler->filter('div[class=entry]')); | 1095 | $this->assertCount(0, $crawler->filter('div[class=entry]')); |
1096 | |||
1097 | // test url search on list of all articles | ||
1098 | $crawler = $client->request('GET', '/all/list'); | ||
1099 | |||
1100 | $form = $crawler->filter('form[name=search]')->form(); | ||
1101 | $data = [ | ||
1102 | 'search_entry[term]' => 'domain', // the search will match an entry with 'domain' in its url | ||
1103 | ]; | ||
1104 | |||
1105 | $crawler = $client->submit($form, $data); | ||
1106 | |||
1107 | $this->assertCount(1, $crawler->filter('div[class=entry]')); | ||
1108 | |||
1109 | // same as previous test but for case-sensitivity | ||
1110 | $crawler = $client->request('GET', '/all/list'); | ||
1111 | |||
1112 | $form = $crawler->filter('form[name=search]')->form(); | ||
1113 | $data = [ | ||
1114 | 'search_entry[term]' => 'doMain', // the search will match an entry with 'domain' in its url | ||
1115 | ]; | ||
1116 | |||
1117 | $crawler = $client->submit($form, $data); | ||
1118 | |||
1119 | $this->assertCount(1, $crawler->filter('div[class=entry]')); | ||
1096 | } | 1120 | } |
1097 | } | 1121 | } |