* 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\ArrayNotation; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @author Carlos Cirello * @author Dariusz Rumiński * @author Graham Campbell * * @internal * * @covers \PhpCsFixer\Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer * * @extends AbstractFixerTestCase<\PhpCsFixer\Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer> */ final class NoMultilineWhitespaceAroundDoubleArrowFixerTest 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 [ ' array(1), $a => array(0 => array()) );', ' array(1), $a => array(0 => array()) );', ]; yield [ ' "b", "c" => "d", "eeeeee" => array(), "ggg" => array(), "hh" => [], );', ' "b", "c" => "d", "eeeeee" => array(), "ggg" => array(), "hh" => [], );', ]; yield [ ' // hello there "value", "hi" => /* * Description. */1, "ha" => /** * Description. */ array() );', ]; yield [ ' null;', ' null;', ]; yield [ ' $one, 2 => $two ];', ' $one, 2 => $two ];', ]; yield [ ' $one, 2 => $two, ];', ' $one, 2 => $two, ];', ]; } }