* 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\Semicolon; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @internal * * @covers \PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer * * @extends AbstractFixerTestCase<\PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer> * * @phpstan-import-type _AutogeneratedInputConfiguration from \PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer */ final class SpaceAfterSemicolonFixerTest extends AbstractFixerTestCase { /** * @dataProvider provideFixCases */ public function testFix(string $expected, ?string $input = null): void { $this->doTest($expected, $input); } /** * @dataProvider provideFixCases */ public function testFixWithSpacesInEmptyForExpressions(string $expected, ?string $input = null): void { $this->fixer->configure([ 'remove_in_empty_for_expressions' => false, ]); $this->doTest($expected, $input); } /** * @return iterable */ public static function provideFixCases(): iterable { yield [ ' 1 2 3 ', ' 1 2 3 ', ]; yield [ 'fixer->configure([ 'remove_in_empty_for_expressions' => true, ]); $this->doTest($expected, $input); } /** * @return iterable */ public static function provideFixWithoutSpacesInEmptyForExpressionsCases(): iterable { yield [ 'doTest('