Added tests related to the namespaced tag support;

Restored ReturnTag::getTypesCollection() to "protected", to avoid potential BC breaks later.
This commit is contained in:
Vasil Rangelov
2012-11-22 01:23:31 +02:00
parent 2dbc608a51
commit bf3e86788d
4 changed files with 106 additions and 20 deletions
@@ -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());
}
/**