forked from phpDocumentor/ReflectionDocBlock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request phpDocumentor#226 from phpDocumentor/fix-resolve-a…
…ll-fqsen-formats Fix FQSEN resolving on see,covers,uses
- Loading branch information
Showing
5 changed files
with
119 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace phpDocumentor\Reflection; | ||
|
||
use phpDocumentor\Reflection\DocBlock\Tags\See; | ||
use phpDocumentor\Reflection\Types\Context; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DocblockSeeTagResolvingTest extends TestCase | ||
{ | ||
public function testResolvesSeeFQSENOfInlineTags() | ||
{ | ||
$context = new Context('\Project\Sub\Level', ['Issue2425B' => '\Project\Other\Level\Issue2425B', 'Aliased' => 'Project\Other\Level\Issue2425C']); | ||
$docblockString = <<<DOCBLOCK | ||
/** | ||
* Class summary. | ||
* | ||
* A description containing an inline {@see Issue2425B::bar()} tag | ||
* to a class inside of the project referenced via a use statement. | ||
* | ||
* And here is another inline {@see Aliased::bar()} tag to a class | ||
* aliased via a use statement. | ||
*/ | ||
DOCBLOCK; | ||
|
||
|
||
|
||
$factory = DocBlockFactory::createInstance(); | ||
$docblock = $factory->create($docblockString, $context); | ||
|
||
/** @var See $see1 */ | ||
$see1 = $docblock->getDescription()->getTags()[0]; | ||
|
||
$this->assertSame('\Project\Other\Level\Issue2425B::bar()', (string)$see1->getReference()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters