Skip to content

Commit

Permalink
Check out how this text gets parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Aug 16, 2023
1 parent 846ae76 commit 5cd06e2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/PHPStan/Parser/PhpDocParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6448,6 +6448,24 @@ public function provideDoctrineWithoutDoctrineCheckData(): Iterator
)),
]),
];

yield [
'Slevomat CS issue #1608',
'/**' . PHP_EOL .
' * `"= "`' . PHP_EOL .
' * a' . PHP_EOL .
' * "' . PHP_EOL .
' *' . PHP_EOL .
' * @package foo' . PHP_EOL .
' */',
new PhpDocNode([
new PhpDocTextNode('`"= "`' . PHP_EOL .
' * a' . PHP_EOL .
' * "'),
new PhpDocTextNode(''),
new PhpDocTagNode('@package', new GenericTagValueNode('foo')),
]),
];
}

public function provideSpecializedTags(): Iterator
Expand Down Expand Up @@ -7079,6 +7097,23 @@ public function dataTextBetweenTagsBelongsToDescription(): iterable
new PhpDocTextNode(''),
]),
];

yield [
'/**' . PHP_EOL .
' * `"= "`' . PHP_EOL .
' * a' . PHP_EOL .
' * "' . PHP_EOL .
' *' . PHP_EOL .
' * @package foo' . PHP_EOL .
' */',
new PhpDocNode([
new PhpDocTextNode('`"= "`' . PHP_EOL .
' * a' . PHP_EOL .
' * "'),
new PhpDocTextNode(''),
new PhpDocTagNode('@package', new GenericTagValueNode('foo')),
]),
];
}

/**
Expand Down

0 comments on commit 5cd06e2

Please sign in to comment.