mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Allow only tags in Docblock argument
The array of tags in the docblock constructor should only contain tags. Some of the factory methods of the tags are returning a null when the tag could not be created. This causes issues during parsing. By filtering these null values in the factory this use is resolved.
This commit is contained in:
@@ -100,6 +100,24 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($tags, $fixture->getTags());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::__construct
|
||||
* @covers ::getTags
|
||||
*
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||
*
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testDocBlockAllowsOnlyTags()
|
||||
{
|
||||
$tags = [
|
||||
null
|
||||
];
|
||||
|
||||
$fixture = new DocBlock('', null, $tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::__construct
|
||||
* @covers ::getTagsByName
|
||||
|
||||
Reference in New Issue
Block a user