aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRicardo Soares de Lima <ricardo.soaresdelima@gmail.com>2012-12-09 16:08:02 -0200
committerChristian Weiske <cweiske@cweiske.de>2013-03-21 06:42:13 +0100
commit2f865db5132c65311f277586459bcbf4c026a8e6 (patch)
tree7c4e4d7052ee9b62af2a07355506d51b2e86c150 /tests
parent3e2d817fc7fecf6b97c5989ca75a52414fbdf0af (diff)
downloadsemanticscuttle-2f865db5132c65311f277586459bcbf4c026a8e6.tar.gz
semanticscuttle-2f865db5132c65311f277586459bcbf4c026a8e6.tar.bz2
The method attachTags was raising a Notice error, fix it and adds a test for this situation.
Diffstat (limited to 'tests')
-rw-r--r--tests/Bookmark2TagTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Bookmark2TagTest.php b/tests/Bookmark2TagTest.php
index b0eccd1..fdfc42e 100644
--- a/tests/Bookmark2TagTest.php
+++ b/tests/Bookmark2TagTest.php
@@ -88,6 +88,21 @@ class Bookmark2TagTest extends TestBase
$this->b2ts->getTagsForBookmark($bid, true)
);
}
+
+ public function testAttachTagsWithEmptyStringAddsSystemUnfiled()
+ {
+ $originalDisplayErros = ini_get('display_errors');
+ $originalErrorReporting = ini_get('error_reporting');
+ ini_set('display_errors', 1);
+ error_reporting(E_ALL);
+ $bid = $this->addBookmark(null, null, 0, '');
+ $this->assertEquals(
+ array('system:unfiled'),
+ $this->b2ts->getTagsForBookmark($bid, true)
+ );
+ ini_set('display_errors', $originalDisplayErros);
+ error_reporting($originalErrorReporting);
+ }
public function testAttachTagsWithSomeEmptyTags()
{