* 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\PhpUnit; use PhpCsFixer\Fixer\PhpUnit\PhpUnitMethodCasingFixer; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @author Filippo Tessarotto * * @internal * * @covers \PhpCsFixer\Fixer\PhpUnit\PhpUnitMethodCasingFixer */ final class PhpUnitMethodCasingFixerTest extends AbstractFixerTestCase { /** * @dataProvider provideFixCases */ public function testFixToCamelCase(string $expected, ?string $input = null): void { $this->doTest($expected, $input); } /** * @dataProvider provideFixCases */ public function testFixToSnakeCase(string $camelExpected, ?string $camelInput = null): void { if (null === $camelInput) { $expected = $camelExpected; $input = $camelInput; } else { $expected = $camelInput; $input = $camelExpected; } $this->fixer->configure(['case' => PhpUnitMethodCasingFixer::SNAKE_CASE]); $this->doTest($expected, $input); } public static function provideFixCases(): iterable { yield 'skip non phpunit methods' => [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ 'doTest($expected, $input); } /** * @return iterable */ public static function provideFix80ToCamelCaseCases(): iterable { yield '@depends annotation with class name in Snake_Case' => [ ' [ '