mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
Added tests related to the namespaced tag support;
Restored ReturnTag::getTypesCollection() to "protected", to avoid potential BC breaks later.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
namespace phpDocumentor\Reflection;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Context;
|
||||
use phpDocumentor\Reflection\DocBlock\Location;
|
||||
|
||||
/**
|
||||
* Test class for phpDocumentor\Reflection\DocBlock
|
||||
@@ -24,6 +25,9 @@ use phpDocumentor\Reflection\DocBlock\Context;
|
||||
*/
|
||||
class DocBlockTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \phpDocumentor\Reflection\DocBlock
|
||||
*/
|
||||
public function testConstruct()
|
||||
{
|
||||
$fixture = <<<DOCBLOCK
|
||||
@@ -38,7 +42,8 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
|
||||
DOCBLOCK;
|
||||
$object = new DocBlock(
|
||||
$fixture,
|
||||
new Context('\MyNamespace', array('PHPDoc' => '\phpDocumentor'))
|
||||
new Context('\MyNamespace', array('PHPDoc' => '\phpDocumentor')),
|
||||
new Location(2)
|
||||
);
|
||||
$this->assertEquals(
|
||||
'This is a short description.',
|
||||
@@ -58,6 +63,7 @@ DOCBLOCK;
|
||||
array('PHPDoc' => '\phpDocumentor'),
|
||||
$object->getContext()->getNamespaceAliases()
|
||||
);
|
||||
$this->assertSame(2, $object->getLocation()->getLineNumber());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user