mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
add test for removeTag()
This commit is contained in:
committed by
Jaap van Otterdijk
parent
c62f4592a0
commit
474fd9e29a
@@ -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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user