diff options
author | Arthur <arthur@hoa.ro> | 2016-07-09 07:36:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-09 07:36:23 +0200 |
commit | 0c4c7ae818336d5b0f94562e551ca1a3f34d3435 (patch) | |
tree | 5f0da042d12c10c8e09deb788c928e0644e9cdcb /tests/LinkFilterTest.php | |
parent | 649af5b501d2a90448242f53764ff693e9854039 (diff) | |
parent | 9ccca40189652e529732683abcdf54fcf775c9ec (diff) | |
download | Shaarli-0c4c7ae818336d5b0f94562e551ca1a3f34d3435.tar.gz Shaarli-0c4c7ae818336d5b0f94562e551ca1a3f34d3435.tar.zst Shaarli-0c4c7ae818336d5b0f94562e551ca1a3f34d3435.zip |
Merge pull request #558 from ArthurHoaro/hashtag4
Hashtag system
Diffstat (limited to 'tests/LinkFilterTest.php')
-rw-r--r-- | tests/LinkFilterTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/LinkFilterTest.php b/tests/LinkFilterTest.php index 1620bb78..7d45fc59 100644 --- a/tests/LinkFilterTest.php +++ b/tests/LinkFilterTest.php | |||
@@ -387,4 +387,30 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase | |||
387 | )) | 387 | )) |
388 | ); | 388 | ); |
389 | } | 389 | } |
390 | |||
391 | /** | ||
392 | * Filter links by #hashtag. | ||
393 | */ | ||
394 | public function testFilterByHashtag() | ||
395 | { | ||
396 | $hashtag = 'hashtag'; | ||
397 | $this->assertEquals( | ||
398 | 3, | ||
399 | count(self::$linkFilter->filter( | ||
400 | LinkFilter::$FILTER_TAG, | ||
401 | $hashtag | ||
402 | )) | ||
403 | ); | ||
404 | |||
405 | $hashtag = 'private'; | ||
406 | $this->assertEquals( | ||
407 | 1, | ||
408 | count(self::$linkFilter->filter( | ||
409 | LinkFilter::$FILTER_TAG, | ||
410 | $hashtag, | ||
411 | false, | ||
412 | true | ||
413 | )) | ||
414 | ); | ||
415 | } | ||
390 | } | 416 | } |