* 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\Alias; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @internal * * @covers \PhpCsFixer\AbstractFunctionReferenceFixer * @covers \PhpCsFixer\Fixer\Alias\PowToExponentiationFixer * * @extends AbstractFixerTestCase<\PhpCsFixer\Fixer\Alias\PowToExponentiationFixer> */ final class PowToExponentiationFixerTest 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 [ '', '', ]; yield [ '', '', ]; yield [ '{$bar}** $obj->{$foo};', '{$bar}, $obj->{$foo});', ]; yield [ 'test(1,2)** $b[2+$c];', 'test(1,2), $b[2+$c]);', ]; yield [ '', '', ]; yield [ 'doTest($expected, $input); } /** * @return iterable */ public static function provideFixPre80Cases(): iterable { yield [ 'doTest($expected, $input); } /** * @return iterable */ public static function provideFix80Cases(): iterable { yield [ 'test(1,2)** $b[2+$c];', 'test(1,2), $b[2+$c]);', ]; } }