Skip to content

Commit 7adaab7

Browse files
committedJan 15, 2025
Test inline @link
1 parent 04c8de0 commit 7adaab7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
 

‎tests/PHPStan/Parser/PhpDocParserTest.php

+22
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ protected function setUp(): void
122122
* @dataProvider provideDoctrineData
123123
* @dataProvider provideDoctrineWithoutDoctrineCheckData
124124
* @dataProvider provideCommentLikeDescriptions
125+
* @dataProvider provideInlineTags
125126
*/
126127
public function testParse(
127128
string $label,
@@ -6024,6 +6025,27 @@ public function provideCommentLikeDescriptions(): Iterator
60246025
];
60256026
}
60266027

6028+
public function provideInlineTags(): Iterator
6029+
{
6030+
yield [
6031+
'Inline @link tag in @copyright',
6032+
'/**' . PHP_EOL .
6033+
' * Unit tests for stored_progress_bar_cleanup' . PHP_EOL .
6034+
' *' . PHP_EOL .
6035+
' * @package core' . PHP_EOL .
6036+
' * @copyright 2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}' . PHP_EOL .
6037+
' * @\ORM\Entity() 2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}' . PHP_EOL .
6038+
' */',
6039+
new PhpDocNode([
6040+
new PhpDocTextNode('Unit tests for stored_progress_bar_cleanup'),
6041+
new PhpDocTextNode(''),
6042+
new PhpDocTagNode('@package', new GenericTagValueNode('core')),
6043+
new PhpDocTagNode('@copyright', new GenericTagValueNode('2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}')),
6044+
new PhpDocTagNode('@\ORM\Entity', new DoctrineTagValueNode(new DoctrineAnnotation('@\ORM\Entity', []), '2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}')),
6045+
]),
6046+
];
6047+
}
6048+
60276049
public function provideParamOutTagsData(): Iterator
60286050
{
60296051
yield [

0 commit comments

Comments
 (0)