aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-02-01 19:21:47 +0100
committerArthur <arthur@hoa.ro>2016-02-01 19:21:47 +0100
commit268a2e52659964fb7d033a1bb4d1490bf8cc49bf (patch)
tree2a7cb003fa9de81312b2d511f431fca6f82ade3e /tests
parent7676d82e7502c44f3754560719ffb92f62680c81 (diff)
parentebd8075a896484e43c7c938bbc606b67df102013 (diff)
downloadShaarli-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.php17
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 /**