mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Fix issue with missing registered factory
This commit is contained in:
@@ -17,11 +17,14 @@ use Mockery as m;
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Method;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\MethodParameter;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Param;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\See;
|
||||
use phpDocumentor\Reflection\Types\Array_;
|
||||
use phpDocumentor\Reflection\Types\Integer;
|
||||
use phpDocumentor\Reflection\Types\String_;
|
||||
use phpDocumentor\Reflection\Types\Void_;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
@@ -185,4 +188,35 @@ DOC;
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function testMethodRegression(): void
|
||||
{
|
||||
$docCommment = <<<DOC
|
||||
/**
|
||||
* This is an example of a summary.
|
||||
*
|
||||
* @method void setInteger(integer \$integer)
|
||||
*/
|
||||
DOC;
|
||||
$factory = DocBlockFactory::createInstance();
|
||||
$docblock = $factory->create($docCommment);
|
||||
|
||||
self::assertEquals(
|
||||
[
|
||||
new Method(
|
||||
'setInteger',
|
||||
[],
|
||||
new Void_(),
|
||||
false,
|
||||
new Description(''),
|
||||
false,
|
||||
[
|
||||
new MethodParameter('integer', new Integer())
|
||||
]
|
||||
),
|
||||
],
|
||||
$docblock->getTags()
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user