Closed owenvoke closed 4 years ago
Pushed some tests for these Rectors. 👍🏻
Tests are working when I filter them locally, however the full test suite isn't and on GitHub Actions it looks like there are warnings about Error: Class 'Symplify\EasyTesting\DataProvider\StaticFixtureFinder' not found
for all tests. 🤔
Just updated to the latest dependencies, looks like that's because Rector includes that package as a dev dependency, rather than a normal dependency.
On a side note, when I install symplify/easy-testing
locally the tests now run without that warning, but instead have the following error for all tests:
Pest\Drift\Testing\Rectors\Polish\FuncCall\PestTestNamingRectorTest::test with data set #0 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
Rector\Core\Exception\ShouldNotHappenException: Class "" in "getRectorClass()" method must be type of "Rector\Core\Contract\Rector\PhpRectorInterface"
/Users/owenvoke/projects/pestphp/drift/vendor/rector/rector/src/Testing/PHPUnit/AbstractGenericRectorTestCase.php:145
/Users/owenvoke/projects/pestphp/drift/vendor/rector/rector/src/Testing/PHPUnit/AbstractGenericRectorTestCase.php:86
/Users/owenvoke/projects/pestphp/drift/vendor/rector/rector/src/Testing/PHPUnit/AbstractRectorTestCase.php:228
/Users/owenvoke/projects/pestphp/drift/vendor/rector/rector/src/Testing/PHPUnit/AbstractRectorTestCase.php:97
One of the test are not implemented yet, so the test suite won't pass. That is on purpose, so we know this bug is there.
Looks like the error about that class started when we upgraded our rector version. Did not see that 😮
Can you add that dependency to our dev dependencies then and fix it?
@owenvoke You can fix that error by implementing getRectorClass
and adding the rector of the test class to it.
That way the test class is only testing one rector which should be possible for us to do for all polish command rectors
This adds 2 new Rectors for the
polish
command to allow renamingtest()
calls.test
uses in test namesit
uses in test namespolish
commandCloses #8