From c96486cfaec95d75a8bb9069481528982ec1b98f Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Thu, 2 Mar 2017 14:17:20 +0100 Subject: test setTagGroups with empty groupids Signed-off-by: Morris Jobke --- tests/lib/SystemTag/SystemTagManagerTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/lib') diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index e697e373465..61fac99ca6c 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -516,6 +516,15 @@ class SystemTagManagerTest extends TestCase { $this->assertEquals([], $this->tagManager->getTagGroups($tag2)); } + /** + * empty groupIds should be ignored + */ + public function testEmptyTagGroup() { + $tag1 = $this->tagManager->createTag('tag1', true, false); + $this->tagManager->setTagGroups($tag1, ['']); + $this->assertEquals([], $this->tagManager->getTagGroups($tag1)); + } + /** * @param ISystemTag $tag1 * @param ISystemTag $tag2 -- cgit v1.2.3