diff options
author | Arthur <arthur@hoa.ro> | 2016-02-01 19:21:47 +0100 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-02-01 19:21:47 +0100 |
commit | 268a2e52659964fb7d033a1bb4d1490bf8cc49bf (patch) | |
tree | 2a7cb003fa9de81312b2d511f431fca6f82ade3e /tests | |
parent | 7676d82e7502c44f3754560719ffb92f62680c81 (diff) | |
parent | ebd8075a896484e43c7c938bbc606b67df102013 (diff) | |
download | Shaarli-268a2e52659964fb7d033a1bb4d1490bf8cc49bf.tar.gz Shaarli-268a2e52659964fb7d033a1bb4d1490bf8cc49bf.tar.zst Shaarli-268a2e52659964fb7d033a1bb4d1490bf8cc49bf.zip |
Merge pull request #453 from ArthurHoaro/pr450
Implemented a little more sophisticated searching (squashed)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/LinkFilterTest.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/LinkFilterTest.php b/tests/LinkFilterTest.php index 5107ab72..5fb2423f 100644 --- a/tests/LinkFilterTest.php +++ b/tests/LinkFilterTest.php | |||
@@ -173,6 +173,11 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase | |||
173 | 2, | 173 | 2, |
174 | count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'ars.userfriendly.org')) | 174 | count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'ars.userfriendly.org')) |
175 | ); | 175 | ); |
176 | |||
177 | $this->assertEquals( | ||
178 | 2, | ||
179 | count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'ars org')) | ||
180 | ); | ||
176 | } | 181 | } |
177 | 182 | ||
178 | /** | 183 | /** |
@@ -208,8 +213,18 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase | |||
208 | { | 213 | { |
209 | $this->assertEquals( | 214 | $this->assertEquals( |
210 | 1, | 215 | 1, |
211 | count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'media publishing')) | 216 | count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'publishing media')) |
217 | ); | ||
218 | |||
219 | $this->assertEquals( | ||
220 | 1, | ||
221 | count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'mercurial w3c')) | ||
212 | ); | 222 | ); |
223 | |||
224 | $this->assertEquals( | ||
225 | 2, | ||
226 | count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, '"free software"')) | ||
227 | ); | ||
213 | } | 228 | } |
214 | 229 | ||
215 | /** | 230 | /** |