From 474fd9e29a4d213f9fac26a2ec24f664c75f473d Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Fri, 10 Nov 2017 23:20:23 +0100 Subject: [PATCH] add test for removeTag() --- tests/unit/DocBlockTest.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/unit/DocBlockTest.php b/tests/unit/DocBlockTest.php index 4a8d4de..bb9356f 100644 --- a/tests/unit/DocBlockTest.php +++ b/tests/unit/DocBlockTest.php @@ -13,6 +13,8 @@ namespace phpDocumentor\Reflection; use Mockery as m; +use phpDocumentor\Reflection\DocBlock\Tags\Deprecated; +use phpDocumentor\Reflection\DocBlock\Tags\See; use phpDocumentor\Reflection\Types\Context; /** @@ -249,4 +251,24 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase $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()); + } }