* 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\Import; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; use PhpCsFixer\WhitespacesFixerConfig; /** * @author Ceeram * * @internal * * @covers \PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer */ final class SingleLineAfterImportsFixerTest extends AbstractFixerTestCase { /** * @dataProvider provideFixCases */ public function testFix(string $expected, ?string $input = null): void { $this->doTest($expected, $input); } public function provideFixCases() { return [ [ ' ', '', ], [ 'doTest($expected, $input); } public function provideFix70Cases() { return [ [ ' test 123 ', ' test 123 ', ], [ 'fixer->setWhitespacesConfig(new WhitespacesFixerConfig("\t", "\r\n")); $this->doTest($expected, $input); } public function provideMessyWhitespacesCases() { return [ [ "doTest($expected, $input); } public function provideFix72Cases() { $imports = [ 'some\a\{ClassA, ClassB, ClassC as C,};', 'function some\a\{fn_a, fn_b, fn_c,};', 'const some\a\{ConstA,ConstB,ConstC,};', 'const some\Z\{ConstX,ConstY,ConstZ,};', ]; $cases = [ [ " [ "