test setTagGroups with empty groupids

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Jörn Friedrich Dreyer 2017-03-02 14:17:20 +01:00 committed by Morris Jobke
parent 4e1aca4e3c
commit c96486cfae
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 9 additions and 0 deletions

View File

@ -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