* 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\Basic; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @author Ivan Boprzenkov * * @internal * * @covers \PhpCsFixer\Fixer\Basic\NonPrintableCharacterFixer */ final class NonPrintableCharacterFixerTest extends AbstractFixerTestCase { /** * @dataProvider provideFixCases */ public function testFix(string $expected, ?string $input = null): void { $this->fixer->configure([ 'use_escape_sequences_in_strings' => false, ]); $this->doTest($expected, $input); } /** * @dataProvider provideFixCases */ public function testFixWithoutEscapeSequences(string $expected, ?string $input = null): void { $this->fixer->configure([ 'use_escape_sequences_in_strings' => false, ]); $this->doTest($expected, $input); } public static function provideFixCases(): iterable { yield [ 'abc', 'a'.pack('H*', 'e2808b').'bc', ]; yield [ 'fixer->configure([ 'use_escape_sequences_in_strings' => true, ]); $this->doTest($expected, $input); } public static function provideFixWithEscapeSequencesInStringsCases(): iterable { yield [ '