mirror of
https://github.com/rectorphp/rector.git
synced 2024-07-22 17:30:23 +00:00
[tests] switch testFiles to data providers
This commit is contained in:
parent
b700e2f9ad
commit
6ef6f073b6
@ -7,13 +7,24 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class Issue594Test extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture594.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
public function getRectorClass(): string
|
||||
{
|
||||
return GetRequestRector::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture594.php.inc'];
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class Issue835Test extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture835.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture835.php.inc'];
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
|
@ -7,9 +7,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class RenameAnnotationRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,9 +19,21 @@ final class ActionInjectionToConstructorInjectionRectorTest extends AbstractRect
|
||||
$parameterProvider->changeParameter(Option::KERNEL_CLASS_PARAMETER, SomeKernelClass::class);
|
||||
}
|
||||
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,21 +7,29 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class AnnotatedPropertyInjectToConstructorInjectionRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
__DIR__ . '/Fixture/fixture5.php.inc',
|
||||
__DIR__ . '/Fixture/fixture6.php.inc',
|
||||
__DIR__ . '/Fixture/fixture7.php.inc',
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
__DIR__ . '/Fixture/parent_constructor.php.inc',
|
||||
__DIR__ . '/Fixture/parent_constructor_with_own_inject.php.inc',
|
||||
__DIR__ . '/Fixture/parent_constructor_with_middle_class.php.inc',
|
||||
]);
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture5.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture6.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture7.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/parent_constructor.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/parent_constructor_with_own_inject.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/parent_constructor_with_middle_class.php.inc'];
|
||||
}
|
||||
|
||||
protected function getRectorClass(): string
|
||||
|
@ -11,9 +11,21 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
*/
|
||||
final class DoctrineRepositoryAsServiceTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/PostController.php']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/PostController.php'];
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
|
@ -9,9 +9,21 @@ use Rector\Tests\Rector\Architecture\Factory\NewObjectToFactoryCreateRector\Sour
|
||||
|
||||
final class NewObjectToFactoryCreateRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,15 +9,24 @@ use Rector\Tests\Rector\Argument\ArgumentAdderRector\Source\SomeParentClient;
|
||||
|
||||
final class ArgumentAdderRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/scoped.php.inc',
|
||||
__DIR__ . '/Fixture/already_added.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/scoped.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/already_added.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,13 +7,22 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class ArgumentDefaultValueReplacerRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,13 +10,22 @@ use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
final class ArgumentRemoverRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/remove_in_middle.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/remove_in_middle.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,9 +9,21 @@ use Rector\Tests\Rector\Assign\PropertyAssignToMethodCallRector\Source\MultiChoi
|
||||
|
||||
final class PropertyAssignToMethodCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,20 @@ use Rector\Tests\Rector\ClassLike\RemoveTraitRector\Source\TraitToBeRemoved;
|
||||
|
||||
final class RemoveTraitRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,21 @@ use Rector\Tests\Rector\ClassMethod\AddMethodParentCallRector\Source\ParentClass
|
||||
|
||||
final class AddMethodParentCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/skip_already_has.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/skip_already_has.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,21 @@ use Rector\Tests\Rector\ClassMethod\AddReturnTypeDeclarationRector\Source\PHPUni
|
||||
|
||||
final class AddReturnTypeDeclarationRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/extended_parent.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/extended_parent.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,21 @@ use Rector\Tests\Rector\ClassMethod\WrapReturnRector\Source\SomeReturnClass;
|
||||
|
||||
final class WrapReturnRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/already_array.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/already_array.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,15 +11,24 @@ use Rector\Tests\Rector\Class_\ParentClassToTraitsRector\Source\SomeTrait;
|
||||
|
||||
final class ParentClassToTraitsRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
__DIR__ . '/Fixture/fixture5.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture5.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,9 +9,20 @@ use Rector\Tests\Rector\Constant\RenameClassConstantRector\Source\LocalFormEvent
|
||||
|
||||
final class RenameClassConstantRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class RenameClassConstantsUseToStringsRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,9 +7,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class FunctionToNewRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,9 +7,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class FunctionToMethodCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,9 +7,21 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class FunctionToStaticCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,13 +7,22 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class RenameFunctionRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/double_function.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/double_function.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,9 +9,21 @@ use Rector\Tests\Rector\Interface_\MergeInterfacesRector\Source\SomeOldInterface
|
||||
|
||||
final class MergeInterfacesRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,21 @@ use Rector\Tests\Rector\Interface_\RemoveInterfacesRector\Source\SomeInterface;
|
||||
|
||||
final class RemoveInterfacesRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,14 +9,23 @@ use Rector\Tests\Rector\MagicDisclosure\GetAndSetToMethodCallRector\Source\SomeC
|
||||
|
||||
final class GetAndSetToMethodCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/get.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/klarka.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/get.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/klarka.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,20 @@ use Symfony\Component\Config\ConfigCache;
|
||||
|
||||
final class ToStringToMethodCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class UnsetAndIssetToMethodCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,14 +8,23 @@ use Rector\Tests\Rector\MethodBody\FluentReplaceRector\Source\FluentInterfaceCla
|
||||
|
||||
final class FluentReplaceRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/some_command.php.inc',
|
||||
__DIR__ . '/Fixture/multiple_some_command.php.inc',
|
||||
__DIR__ . '/Fixture/skip_date_time_modify_command.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/some_command.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/multiple_some_command.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/skip_date_time_modify_command.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,14 +8,23 @@ use Rector\Tests\Rector\MethodBody\NormalToFluentRector\Source\FluentInterfaceCl
|
||||
|
||||
final class NormalToFluentRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,13 +7,22 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class ReturnThisRemoveRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,20 @@ use Rector\Tests\Rector\MethodCall\MethodCallToAnotherMethodCallWithArgumentsRec
|
||||
|
||||
final class MethodCallToAnotherMethodCallWithArgumentsRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,14 +9,23 @@ use Rector\Tests\Rector\MethodCall\RenameMethodCallRector\Source\ClassMethodToBe
|
||||
|
||||
final class RenameMethodCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,19 +10,28 @@ use Rector\Tests\Rector\MethodCall\RenameMethodRector\Source\FormMacros;
|
||||
|
||||
final class RenameMethodRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
__DIR__ . '/Fixture/fixture5.php.inc',
|
||||
__DIR__ . '/Fixture/fixture6.php.inc',
|
||||
__DIR__ . '/Fixture/under_anonymous_class.php.inc',
|
||||
__DIR__ . '/Fixture/SomeClass.php',
|
||||
__DIR__ . '/Fixture/nette_to_symfony_presenter.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture5.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture6.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/under_anonymous_class.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/SomeClass.php'];
|
||||
yield [__DIR__ . '/Fixture/nette_to_symfony_presenter.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,9 +9,21 @@ use Rector\Tests\Rector\MethodCall\RenameStaticMethodRector\Source\FormMacros;
|
||||
|
||||
final class RenameStaticMethodRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,9 +9,20 @@ use Rector\Tests\Rector\MethodCall\ServiceGetterToConstructorInjectionRector\Sou
|
||||
|
||||
final class ServiceGetterToConstructorInjectionRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,17 +7,26 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class PseudoNamespaceToNamespaceRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
__DIR__ . '/Fixture/fixture5.php.inc',
|
||||
__DIR__ . '/Fixture/fixture6.php.inc',
|
||||
__DIR__ . '/Fixture/var_doc.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture5.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture6.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/var_doc.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,15 +7,24 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class RenameNamespaceRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
__DIR__ . '/Fixture/fixture5.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture5.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,9 +9,20 @@ use Rector\Tests\Rector\New_\NewToStaticCallRector\Source\IntoStaticClass;
|
||||
|
||||
final class NewToStaticCallRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,20 +19,33 @@ final class InjectAnnotationClassRectorTest extends AbstractRectorTestCase
|
||||
$parameterProvider->changeParameter(Option::KERNEL_CLASS_PARAMETER, SomeKernelClass::class);
|
||||
}
|
||||
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [
|
||||
// JMS
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
__DIR__ . '/Fixture/fixture4.php.inc',
|
||||
__DIR__ . '/Fixture/fixture5.php.inc',
|
||||
];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture5.php.inc'];
|
||||
yield [
|
||||
// PHP DI
|
||||
__DIR__ . '/Fixture/inject_from_var.php.inc',
|
||||
__DIR__ . '/Fixture/inject_from_var2.php.inc',
|
||||
__DIR__ . '/Fixture/inject_from_var3.php.inc',
|
||||
]);
|
||||
];
|
||||
yield [__DIR__ . '/Fixture/inject_from_var2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/inject_from_var3.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,21 @@ use Rector\Tests\Rector\Property\PropertyToMethodRector\Source\Translator;
|
||||
|
||||
final class PropertyToMethodRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,20 @@ use Rector\Tests\Rector\Property\RenamePropertyRector\Source\ClassWithProperties
|
||||
|
||||
final class RenamePropertyRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,9 +12,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
*/
|
||||
final class RectorOrderTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,20 @@ use Rector\Tests\Rector\StaticCall\StaticCallToFunctionRector\Source\SomeOldStat
|
||||
|
||||
final class StaticCallToFunctionRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,9 +7,20 @@ use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class StringToClassConstantRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,12 +9,21 @@ use Rector\Tests\Rector\Typehint\ParentTypehintedArgumentRector\Source\ParserInt
|
||||
|
||||
final class ParentTypehintedArgumentRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/SomeClassImplementingParserInterface.php',
|
||||
__DIR__ . '/Fixture/MyMetadataFactory.php',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/SomeClassImplementingParserInterface.php'];
|
||||
yield [__DIR__ . '/Fixture/MyMetadataFactory.php'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,21 @@ use Rector\Tests\Rector\Visibility\ChangeConstantVisibilityRector\Source\ParentO
|
||||
|
||||
final class ChangeConstantVisibilityRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,9 +8,21 @@ use Rector\Tests\Rector\Visibility\ChangeMethodVisibilityRector\Source\ParentObj
|
||||
|
||||
final class ChangeMethodVisibilityRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture2.php.inc']);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,13 +8,22 @@ use Rector\Tests\Rector\Visibility\ChangePropertyVisibilityRector\Source\ParentO
|
||||
|
||||
final class ChangePropertyVisibilityRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
/**
|
||||
* @dataProvider provideDataForTest()
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture2.php.inc',
|
||||
__DIR__ . '/Fixture/fixture3.php.inc',
|
||||
]);
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function provideDataForTest(): iterable
|
||||
{
|
||||
yield [__DIR__ . '/Fixture/fixture.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture2.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/fixture3.php.inc'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user