add test for removeTag()

This commit is contained in:
TomasVotruba
2017-11-10 23:53:51 +01:00
committed by Jaap van Otterdijk
parent c62f4592a0
commit 474fd9e29a
+22
View File
@@ -13,6 +13,8 @@
namespace phpDocumentor\Reflection; namespace phpDocumentor\Reflection;
use Mockery as m; use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Tags\Deprecated;
use phpDocumentor\Reflection\DocBlock\Tags\See;
use phpDocumentor\Reflection\Types\Context; use phpDocumentor\Reflection\Types\Context;
/** /**
@@ -249,4 +251,24 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($fixture->isTemplateEnd()); $this->assertTrue($fixture->isTemplateEnd());
} }
/**
* @covers ::__construct
* @covers ::removeTag
*
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated
*/
public function testRemoveTag()
{
$someTag = new Deprecated();
$fixture = new DocBlock('', null, [$someTag]);
$this->assertCount(1, $fixture->getTags());
$fixture->removeTag($someTag);
$this->assertCount(0, $fixture->getTags());
}
} }