public function TagTest::testNamespacedTagHandlerCorrectRegistration in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php \phpDocumentor\Reflection\DocBlock\TagTest::testNamespacedTagHandlerCorrectRegistration()
@depends testTagHandlerCorrectRegistration @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
Return value
void
File
- vendor/
phpdocumentor/ reflection-docblock/ tests/ phpDocumentor/ Reflection/ DocBlock/ TagTest.php, line 126
Class
- TagTest
- Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag
Namespace
phpDocumentor\Reflection\DocBlockCode
public function testNamespacedTagHandlerCorrectRegistration() {
$tagPreReg = Tag::createInstance('@T something');
$this
->assertInstanceOf(__NAMESPACE__ . '\\Tag', $tagPreReg);
$this
->assertNotInstanceOf('\\MyTagHandler', $tagPreReg);
$this
->assertTrue(Tag::registerTagHandler('\\MyNamespace\\MyTag', '\\MyTagHandler'));
$tagPostReg = Tag::createInstance('@T something', new DocBlock('', new Context('', array(
'T' => '\\MyNamespace\\MyTag',
))));
$this
->assertInstanceOf(__NAMESPACE__ . '\\Tag', $tagPostReg);
$this
->assertInstanceOf('\\MyTagHandler', $tagPostReg);
$this
->assertTrue(Tag::registerTagHandler('\\MyNamespace\\MyTag', null));
}