1313namespace phpDocumentor \Reflection ;
1414
1515use phpDocumentor \Reflection \DocBlock \Description ;
16+ use phpDocumentor \Reflection \DocBlock \StandardTagFactory ;
17+ use phpDocumentor \Reflection \DocBlock \Tag ;
18+ use phpDocumentor \Reflection \DocBlock \Tags \See ;
1619
1720/**
1821 * @coversNothing
@@ -29,7 +32,7 @@ public function testInterpretingASimpleDocBlock()
2932 * @var string $summary
3033 * @var Description $description
3134 */
32- include (__DIR__ . '/../../examples/interpreting-a-simple-docblock.php ' );
35+ include (__DIR__ . '/../../examples/01- interpreting-a-simple-docblock.php ' );
3336
3437 $ descriptionText = <<<DESCRIPTION
3538This is a Description. A Summary and Description are separated by either
@@ -44,4 +47,26 @@ public function testInterpretingASimpleDocBlock()
4447 $ this ->assertSame ($ descriptionText , $ description ->render ());
4548 $ this ->assertEmpty ($ docblock ->getTags ());
4649 }
50+
51+ public function testInterpretingTags ()
52+ {
53+ /**
54+ * @var DocBlock $docblock
55+ * @var boolean $hasSeeTag
56+ * @var Tag[] $tags
57+ * @var See[] $seeTags
58+ */
59+ include (__DIR__ . '/../../examples/02-interpreting-tags.php ' );
60+
61+ $ this ->assertTrue ($ hasSeeTag );
62+ $ this ->assertCount (1 , $ tags );
63+ $ this ->assertCount (1 , $ seeTags );
64+
65+ $ this ->assertInstanceOf (See::class, $ tags [0 ]);
66+ $ this ->assertInstanceOf (See::class, $ seeTags [0 ]);
67+
68+ $ seeTag = $ seeTags [0 ];
69+ $ this ->assertSame ('\\' . StandardTagFactory::class, (string )$ seeTag ->getReference ());
70+ $ this ->assertSame ('' , (string )$ seeTag ->getDescription ());
71+ }
4772}
0 commit comments