* 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\Tests\Test\AbstractFixerTestCase; /** * @internal * * @covers \PhpCsFixer\Fixer\PhpUnit\PhpUnitAssertNewNamesFixer * * @extends AbstractFixerTestCase<\PhpCsFixer\Fixer\PhpUnit\PhpUnitAssertNewNamesFixer> */ final class PhpUnitAssertNewNamesFixerTest 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 [ self::generateTest( ' $this->assertFileDoesNotExist($a); $this->assertIsNotReadable($a); $this->assertIsNotWritable($a); $this->assertDirectoryDoesNotExist($a); $this->assertDirectoryIsNotReadable($a); $this->assertDirectoryIsNotWriteable($a); $this->assertFileIsNotReadable($a); $this->assertFileIsNotWriteable($a); $this->assertMatchesRegularExpression($a); $this->assertDoesNotMatchRegularExpression($a); ' ), self::generateTest( ' $this->assertFileNotExists($a); $this->assertNotIsReadable($a); $this->assertNotIsWritable($a); $this->assertDirectoryNotExists($a); $this->assertDirectoryNotIsReadable($a); $this->assertDirectoryNotIsWritable($a); $this->assertFileNotIsReadable($a); $this->assertFileNotIsWritable($a); $this->assertRegExp($a); $this->assertNotRegExp($a); ' ), ]; } private static function generateTest(string $content): string { return "