aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/Bookmark2TagTest.php10
-rw-r--r--tests/TagTest.php8
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/Bookmark2TagTest.php b/tests/Bookmark2TagTest.php
index f466a7d..b0eccd1 100644
--- a/tests/Bookmark2TagTest.php
+++ b/tests/Bookmark2TagTest.php
@@ -89,7 +89,15 @@ class Bookmark2TagTest extends TestBase
);
}
-
+ public function testAttachTagsWithSomeEmptyTags()
+ {
+ $bid = $this->addBookmark(null, null, 0, array());
+ $this->b2ts->attachTags($bid, array('foo', '', 'bar', 'baz'));
+ $this->assertEquals(
+ array('foo', 'bar', 'baz'),
+ $this->b2ts->getTagsForBookmark($bid)
+ );
+ }
/**
* Test getTagsForBookmark() when the bookmark has no tags
diff --git a/tests/TagTest.php b/tests/TagTest.php
index 96f3f14..bda5a29 100644
--- a/tests/TagTest.php
+++ b/tests/TagTest.php
@@ -87,5 +87,13 @@ class TagTest extends TestBase
}
+ public function testNormalizeEmptyValues()
+ {
+ $tags = $this->ts->normalize(
+ array('foo', '', 'bar', 'baz')
+ );
+ $this->assertEquals(array('foo', 'bar', 'baz'), $tags);
+ }
+
}
?>