add (broken) tests for Services_Tag::normalize and Bookmark2Tag::attachTags with some empty tags

This commit is contained in:
Christian Weiske 2013-03-21 06:39:11 +01:00
parent f8b5ad1cad
commit c4ba9ef2d2
2 changed files with 17 additions and 1 deletions

View File

@ -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 * Test getTagsForBookmark() when the bookmark has no tags

View File

@ -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);
}
} }
?> ?>