Skip to content

Commit 474fd9e

Browse files
TomasVotrubajaapio
authored andcommitted
add test for removeTag()
1 parent c62f459 commit 474fd9e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/unit/DocBlockTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
namespace phpDocumentor\Reflection;
1414

1515
use Mockery as m;
16+
use phpDocumentor\Reflection\DocBlock\Tags\Deprecated;
17+
use phpDocumentor\Reflection\DocBlock\Tags\See;
1618
use phpDocumentor\Reflection\Types\Context;
1719

1820
/**
@@ -249,4 +251,24 @@ public function testDocBlockKnowsIfItIsTheEndOfADocBlockTemplate()
249251

250252
$this->assertTrue($fixture->isTemplateEnd());
251253
}
254+
255+
256+
/**
257+
* @covers ::__construct
258+
* @covers ::removeTag
259+
*
260+
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated
261+
*/
262+
public function testRemoveTag()
263+
{
264+
$someTag = new Deprecated();
265+
266+
$fixture = new DocBlock('', null, [$someTag]);
267+
268+
$this->assertCount(1, $fixture->getTags());
269+
270+
$fixture->removeTag($someTag);
271+
272+
$this->assertCount(0, $fixture->getTags());
273+
}
252274
}

0 commit comments

Comments
 (0)