1
0
Fork 0

ClassMapGeneratorTest: add test with consecutive duplicate heredoc markers

... as well as a test with heredoc markers with only a newline character between the start and end marker.
pull/10072/head
jrfnl 2021-08-21 00:16:46 +02:00 committed by Jordi Boggiano
parent d3c176ec69
commit b66b23a03f
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 27 additions and 0 deletions

View File

@ -55,6 +55,9 @@ class ClassMapGeneratorTest extends TestCase
'Foo\\LargeGap' => realpath(__DIR__) . '/Fixtures/classmap/LargeGap.php',
'Foo\\MissingSpace' => realpath(__DIR__) . '/Fixtures/classmap/MissingSpace.php',
'Foo\\StripNoise' => realpath(__DIR__) . '/Fixtures/classmap/StripNoise.php',
'Foo\\First' => realpath(__DIR__) . '/Fixtures/classmap/StripNoise.php',
'Foo\\Second' => realpath(__DIR__) . '/Fixtures/classmap/StripNoise.php',
'Foo\\Third' => realpath(__DIR__) . '/Fixtures/classmap/StripNoise.php',
'Foo\\SlashedA' => realpath(__DIR__) . '/Fixtures/classmap/BackslashLineEndingString.php',
'Foo\\SlashedB' => realpath(__DIR__) . '/Fixtures/classmap/BackslashLineEndingString.php',
'Unicode\\↑\\↑' => realpath(__DIR__) . '/Fixtures/classmap/Unicode.php',

View File

@ -90,3 +90,27 @@ NOWDOCTABBED . <<<'NOWDOCPHP73'
return 'class FailSimpleString {}';
}
}
// Issue #10067.
abstract class First {
public function heredocDuplicateMarker(): void {
echo <<<DUPLICATE_MARKER
DUPLICATE_MARKER;
}
}
abstract class Second extends First {
public function heredocDuplicateMarker(): void {
echo <<<DUPLICATE_MARKER
DUPLICATE_MARKER;
}
}
abstract class Third extends First {
public function heredocMarkersOnlyWhitespaceBetween(): void {
echo <<<DUPLICATE_MARKER
DUPLICATE_MARKER;
}
}