mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
add tests for bug #63;
This commit is contained in:
@@ -33,6 +33,31 @@ class InterpretingDocBlocksTest extends TestCase
|
||||
m::close();
|
||||
}
|
||||
|
||||
public function testInterpretingSummaryWithEllipsis(): void
|
||||
{
|
||||
$docblock = <<<DOCBLOCK
|
||||
/**
|
||||
* This is a short (...) description.
|
||||
*
|
||||
* This is a long description.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
DOCBLOCK;
|
||||
|
||||
$factory = DocBlockFactory::createInstance();
|
||||
$phpdoc = $factory->create($docblock);
|
||||
|
||||
$summary = 'This is a short (...) description.';
|
||||
$description = 'This is a long description.';
|
||||
|
||||
$this->assertInstanceOf(DocBlock::class, $phpdoc);
|
||||
$this->assertSame($summary, $phpdoc->getSummary());
|
||||
$this->assertSame($description, $phpdoc->getDescription()->render());
|
||||
$this->assertCount(1, $phpdoc->getTags());
|
||||
$this->assertTrue($phpdoc->hasTag('return'));
|
||||
}
|
||||
|
||||
public function testInterpretingASimpleDocBlock(): void
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user