Skip to content

Commit

Permalink
Test inline @link
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 15, 2025
1 parent 04c8de0 commit 7adaab7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/PHPStan/Parser/PhpDocParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ protected function setUp(): void
* @dataProvider provideDoctrineData
* @dataProvider provideDoctrineWithoutDoctrineCheckData
* @dataProvider provideCommentLikeDescriptions
* @dataProvider provideInlineTags
*/
public function testParse(
string $label,
Expand Down Expand Up @@ -6024,6 +6025,27 @@ public function provideCommentLikeDescriptions(): Iterator
];
}

public function provideInlineTags(): Iterator
{
yield [
'Inline @link tag in @copyright',
'/**' . PHP_EOL .
' * Unit tests for stored_progress_bar_cleanup' . PHP_EOL .
' *' . PHP_EOL .
' * @package core' . PHP_EOL .
' * @copyright 2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}' . PHP_EOL .
' * @\ORM\Entity() 2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}' . PHP_EOL .
' */',
new PhpDocNode([
new PhpDocTextNode('Unit tests for stored_progress_bar_cleanup'),
new PhpDocTextNode(''),
new PhpDocTagNode('@package', new GenericTagValueNode('core')),
new PhpDocTagNode('@copyright', new GenericTagValueNode('2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}')),
new PhpDocTagNode('@\ORM\Entity', new DoctrineTagValueNode(new DoctrineAnnotation('@\ORM\Entity', []), '2024 onwards Catalyst IT EU {@link https://catalyst-eu.net}')),
]),
];
}

public function provideParamOutTagsData(): Iterator
{
yield [
Expand Down

0 comments on commit 7adaab7

Please sign in to comment.