Introduced Context and Location, and adapted Collection and ReturnTag accordingly.

This commit is contained in:
Vasil Rangelov
2012-11-21 15:55:10 +02:00
parent a4b899e96c
commit 8bb304309c
17 changed files with 400 additions and 245 deletions
@@ -12,6 +12,8 @@
namespace phpDocumentor\Reflection;
use phpDocumentor\Reflection\DocBlock\Context;
/**
* Test class for phpDocumentor\Reflection\DocBlock
*
@@ -36,8 +38,7 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
DOCBLOCK;
$object = new DocBlock(
$fixture,
'\MyNamespace',
array('PHPDoc' => '\phpDocumentor')
new Context('\MyNamespace', array('PHPDoc' => '\phpDocumentor'))
);
$this->assertEquals(
'This is a short description.',
@@ -52,10 +53,10 @@ DOCBLOCK;
$this->assertTrue($object->hasTag('return'));
$this->assertFalse($object->hasTag('category'));
$this->assertSame('\MyNamespace', $object->getNamespace());
$this->assertSame('MyNamespace', $object->getContext()->getNamespace());
$this->assertSame(
array('PHPDoc' => '\phpDocumentor'),
$object->getNamespaceAliases()
$object->getContext()->getNamespaceAliases()
);
}