We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e4b1dd3 + 98e82e3 commit d708b18Copy full SHA for d708b18
tests/unit/DocBlock/Tags/InvalidTagTest.php
@@ -108,4 +108,19 @@ private function throwExceptionWithResourceArgument(): void
108
109
$function(fopen(__FILE__, 'r'));
110
}
111
+
112
+ public function testCreationWithErrorFromEval(): void
113
+ {
114
+ $builder = static function (): InvalidArgumentException {
115
+ return new InvalidArgumentException();
116
+ };
117
118
+ $exception = eval('return $builder();');
119
+ $tag = InvalidTag::create('Body', 'name')->withError($exception);
120
121
+ self::assertSame('name', $tag->getName());
122
+ self::assertSame('@name Body', $tag->render());
123
+ self::assertSame('Body', (string) $tag);
124
+ self::assertSame($exception, $tag->getException());
125
+ }
126
0 commit comments