File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 18
18
use phpDocumentor \Reflection \DocBlock \Tags \Formatter ;
19
19
use phpDocumentor \Reflection \DocBlock \Tags \Formatter \PassthroughFormatter ;
20
20
use phpDocumentor \Reflection \DocBlock \Tags \Generic ;
21
+ use phpDocumentor \Reflection \DocBlock \Tags \InvalidTag ;
21
22
use phpDocumentor \Reflection \DocBlock \Tags \Return_ ;
22
23
use phpDocumentor \Reflection \DocBlock \Tags \See ;
23
24
use phpDocumentor \Reflection \Fqsen ;
@@ -330,4 +331,14 @@ public function testReturnTagIsMappedCorrectly() : void
330
331
$ this ->assertInstanceOf (Return_::class, $ tag );
331
332
$ this ->assertSame ('return ' , $ tag ->getName ());
332
333
}
334
+
335
+ public function testInvalidTagIsReturnedOnFailure ()
336
+ {
337
+ $ tagFactory = new StandardTagFactory (m::mock (FqsenResolver::class));
338
+
339
+ /** @var InvalidTag $tag */
340
+ $ tag = $ tagFactory ->create ('@see $name some invalid tag ' );
341
+
342
+ $ this ->assertInstanceOf (InvalidTag::class, $ tag );
343
+ }
333
344
}
You can’t perform that action at this time.
0 commit comments