diff --git a/rules-tests/Renaming/Rector/Name/RenameClassRector/AutoImportNamesWithoutRemoveUnusedImportTest.php b/rules-tests/Renaming/Rector/Name/RenameClassRector/AutoImportNamesWithoutRemoveUnusedImportTest.php new file mode 100644 index 00000000000..ea1b4ccbf7d --- /dev/null +++ b/rules-tests/Renaming/Rector/Name/RenameClassRector/AutoImportNamesWithoutRemoveUnusedImportTest.php @@ -0,0 +1,31 @@ +doTestFile($filePath); + } + + public static function provideData(): Iterator + { + return self::yieldFilesFromDirectory(__DIR__ . '/FixtureAutoImportNamesWithoutRemoveUnusedImport'); + } + + public function provideConfigFilePath(): string + { + return __DIR__ . '/config/auto_import_names_without_remove_unused_use.php'; + } +} diff --git a/rules-tests/Renaming/Rector/Name/RenameClassRector/FixtureAutoImportNamesWithoutRemoveUnusedImport/factory_invoke_typehint.php.inc b/rules-tests/Renaming/Rector/Name/RenameClassRector/FixtureAutoImportNamesWithoutRemoveUnusedImport/factory_invoke_typehint.php.inc new file mode 100644 index 00000000000..88c8571e89e --- /dev/null +++ b/rules-tests/Renaming/Rector/Name/RenameClassRector/FixtureAutoImportNamesWithoutRemoveUnusedImport/factory_invoke_typehint.php.inc @@ -0,0 +1,29 @@ + +----- + diff --git a/rules-tests/Renaming/Rector/Name/RenameClassRector/config/auto_import_names_without_remove_unused_use.php b/rules-tests/Renaming/Rector/Name/RenameClassRector/config/auto_import_names_without_remove_unused_use.php new file mode 100644 index 00000000000..902b119ead9 --- /dev/null +++ b/rules-tests/Renaming/Rector/Name/RenameClassRector/config/auto_import_names_without_remove_unused_use.php @@ -0,0 +1,14 @@ +importNames(); + + $rectorConfig->ruleWithConfiguration(RenameClassRector::class, [ + 'Interop\Container\ContainerInterface' => 'Psr\Container\ContainerInterface', + ]); +}; \ No newline at end of file