aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/LinkDBTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-01-20 23:34:33 +0100
committerArthurHoaro <arthur@hoa.ro>2016-02-15 20:40:39 +0100
commit21979ff11ceee0042642ac17147858a4155d54c5 (patch)
tree9527f3dbb2a23e0b42a2f9ce4cc7d4c7580da455 /tests/LinkDBTest.php
parent6e607ca613b47e17f7516e94adfee930d4f3e1e8 (diff)
downloadShaarli-21979ff11ceee0042642ac17147858a4155d54c5.tar.gz
Shaarli-21979ff11ceee0042642ac17147858a4155d54c5.tar.zst
Shaarli-21979ff11ceee0042642ac17147858a4155d54c5.zip
Add exclusion in tag search
* Searching '-mytag' will now exlude all shaares with 'mytag' tag. * All tags starting with a '-' are renamed without it (through the Updater). * Unit tests. Minor code changes: * LinkDB->filter() can now take no parameters (get all link depending on logged status). * tagsStrToArray() is now static and filters blank tags.
Diffstat (limited to 'tests/LinkDBTest.php')
-rw-r--r--tests/LinkDBTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php
index 3b1a2057..06edea79 100644
--- a/tests/LinkDBTest.php
+++ b/tests/LinkDBTest.php
@@ -276,7 +276,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
276 'media' => 1, 276 'media' => 1,
277 'software' => 1, 277 'software' => 1,
278 'stallman' => 1, 278 'stallman' => 1,
279 'free' => 1 279 'free' => 1,
280 '-exclude' => 1,
280 ), 281 ),
281 self::$publicLinkDB->allTags() 282 self::$publicLinkDB->allTags()
282 ); 283 );
@@ -295,7 +296,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
295 'html' => 1, 296 'html' => 1,
296 'w3c' => 1, 297 'w3c' => 1,
297 'css' => 1, 298 'css' => 1,
298 'Mercurial' => 1 299 'Mercurial' => 1,
300 '-exclude' => 1,
299 ), 301 ),
300 self::$privateLinkDB->allTags() 302 self::$privateLinkDB->allTags()
301 ); 303 );