* Dariusz Rumiński * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Tests\Fixer\StringNotation; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @internal * * @covers \PhpCsFixer\Fixer\StringNotation\HeredocClosingMarkerFixer * * @extends AbstractFixerTestCase<\PhpCsFixer\Fixer\StringNotation\HeredocClosingMarkerFixer> * * @phpstan-import-type _AutogeneratedInputConfiguration from \PhpCsFixer\Fixer\StringNotation\HeredocClosingMarkerFixer */ final class HeredocClosingMarkerFixerTest extends AbstractFixerTestCase { /** * @param _AutogeneratedInputConfiguration $config * * @dataProvider provideFixCases */ public function testFix(string $expected, ?string $input = null, array $config = []): void { $this->fixer->configure($config); $this->doTest($expected, $input); } /** * @return iterable}> */ public static function provideFixCases(): iterable { yield 'heredoc' => [ <<<'PHP' [ <<<'PHP' [ <<<'PHP' 'EOF'], ]; yield 'heredoc /w custom explicit style' => [ <<<'PHP' true], ]; yield 'heredoc /w b' => [ <<<'PHP' [ <<<'PHP' [ <<<'PHP_' [ <<<'PHP_' [ <<<'PHP' ['Žlutý']], ]; yield 'no longer colliding reserved marker recovery' => [ <<<'PHP' [ <<<'PHP' [ <<<'PHP' [ <<<'PHP' [ <<<'PHP' [ <<<'PHP'