I created dummy test files to check whether the rules apply correctly. The test file contains the below contents:
use PHPUnit\Framework\TestCase;
final class SomeTest extends TestCase
{
public function test()
{
$someMockObject = $this->createMock(SomeClass::class);
$someMockObject->method('someMethod')
->willReturn(100);
}
}
When I run vendor/bin/rector process tests/SomeTest.php --dry-run it gives [OK] Rector is done!.
No rules are applied. When I add the below line to config:
I use rector 1.1.1 and PHPUnit 10.5.24.
My configuration is:
I created dummy test files to check whether the rules apply correctly. The test file contains the below contents:
When I run
vendor/bin/rector process tests/SomeTest.php --dry-run
it gives[OK] Rector is done!
.No rules are applied. When I add the below line to config:
>withRules([CreateMockToAnonymousClassRector::class]);
It applies the rector changes correctly. Why doesn't it work with
withSets([PHPUnitSetList::PHPUNIT_100])
?Please help.