* 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\PhpTag; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @internal * * @covers \PhpCsFixer\Fixer\PhpTag\FullOpeningTagFixer * * @extends AbstractFixerTestCase<\PhpCsFixer\Fixer\PhpTag\FullOpeningTagFixer> */ final class FullOpeningTagFixerTest extends AbstractFixerTestCase { /** * @dataProvider provideFixCases */ public function testFix(string $expected, ?string $input = null): void { $this->doTest($expected, $input); } /** * @return iterable */ public static function provideFixCases(): iterable { yield [' PLAIN TEXT']; yield ['PLAIN TEXT']; yield [' to long-form and to * */', ]; yield [ "data = preg_replace('/<\\?(?!xml|php)/s', 'data);", ]; yield [ 'foo bar TEST; ?> TEST; ?> ', ]; yield 'binary string' => [ '", ""]; yield [ 'foo bar bar