Testing Rector rules and PHPStan rules in the same test suite #8975
-
Hello, we have a package which provides PHPStan and Rector rules. Those are tested thanks to PHPUnit, each tests are passing individually, but they are failing when we run the full testsuite:
I guess this is because Rector ships its own vendors, and Is there any solution for this, beside to split into two testsuites? FYI We have the same problem using both phpstan and rector v1 or v2 thanks for your response. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, You can include rector's preload.php for that in phpunit bootstrap, see for example https://github.com/cakephp/upgrade/blob/0f84083e7fa59315c5a37c8c38632d4670bd1001/tests/bootstrap.php#L14 |
Beta Was this translation helpful? Give feedback.
Hi, You can include rector's preload.php for that in phpunit bootstrap, see for example https://github.com/cakephp/upgrade/blob/0f84083e7fa59315c5a37c8c38632d4670bd1001/tests/bootstrap.php#L14