13
13
namespace phpDocumentor \Reflection ;
14
14
15
15
use phpDocumentor \Reflection \DocBlock \Description ;
16
+ use phpDocumentor \Reflection \DocBlock \StandardTagFactory ;
17
+ use phpDocumentor \Reflection \DocBlock \Tag ;
18
+ use phpDocumentor \Reflection \DocBlock \Tags \See ;
16
19
17
20
/**
18
21
* @coversNothing
@@ -29,7 +32,7 @@ public function testInterpretingASimpleDocBlock()
29
32
* @var string $summary
30
33
* @var Description $description
31
34
*/
32
- include (__DIR__ . '/../../examples/interpreting-a-simple-docblock.php ' );
35
+ include (__DIR__ . '/../../examples/01- interpreting-a-simple-docblock.php ' );
33
36
34
37
$ descriptionText = <<<DESCRIPTION
35
38
This is a Description. A Summary and Description are separated by either
@@ -44,4 +47,26 @@ public function testInterpretingASimpleDocBlock()
44
47
$ this ->assertSame ($ descriptionText , $ description ->render ());
45
48
$ this ->assertEmpty ($ docblock ->getTags ());
46
49
}
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
+ }
47
72
}
0 commit comments