add test for removeTag()

This commit is contained in:
TomasVotruba
2017-11-10 23:53:51 +01:00
committed by Jaap van Otterdijk
parent 474fd9e29a
commit 0cb4b04fa6
+5
View File
@@ -262,11 +262,16 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
public function testRemoveTag() public function testRemoveTag()
{ {
$someTag = new Deprecated(); $someTag = new Deprecated();
$anotherTag = new Deprecated();
$fixture = new DocBlock('', null, [$someTag]); $fixture = new DocBlock('', null, [$someTag]);
$this->assertCount(1, $fixture->getTags()); $this->assertCount(1, $fixture->getTags());
$fixture->removeTag($anotherTag);
$this->assertCount(1, $fixture->getTags());
$fixture->removeTag($someTag); $fixture->removeTag($someTag);
$this->assertCount(0, $fixture->getTags()); $this->assertCount(0, $fixture->getTags());