rector/vendor/rector/rector-phpunit
Tomas Votruba 1f621e91a4 Updated Rector to commit 88eed987cc361166359c158ffd22d264d165aa8b
88eed987cc Ensure check isFirstClassCallable() before node->getArgs() on CallLike (#4049)
2023-06-02 12:32:12 +00:00
..
config Updated Rector to commit bdc2fc99631f67eeb2d96e2cf0906279c2561c9a 2023-06-01 08:56:46 +00:00
docs Updated Rector to commit cfccdd090b640d7b63592eca1744e0582db19830 2023-06-01 23:56:12 +00:00
src Updated Rector to commit 88eed987cc361166359c158ffd22d264d165aa8b 2023-06-02 12:32:12 +00:00
composer.json Updated Rector to commit 6482c594e4b554a814165d11baeece9498868caa 2023-05-14 09:35:45 +00:00
easy-ci.php Updated Rector to commit bdc2fc99631f67eeb2d96e2cf0906279c2561c9a 2023-06-01 08:56:46 +00:00
LICENSE Updated Rector to commit 89a7a4dfbb3e05a306c0f5b9950c28588d4f2af9 2022-07-01 13:42:45 +00:00
README.md Updated Rector to commit dc6bd9680c 2022-05-31 07:17:00 +00:00
rector.php Updated Rector to commit bdc2fc99631f67eeb2d96e2cf0906279c2561c9a 2023-06-01 08:56:46 +00:00

Rector Rules for PHPUnit

See available PHPUnit rules

Install

This package is already part of rector/rector package, so it works out of the box.

All you need to do is install the main package, and you're good to go:

composer require rector/rector --dev

Use Sets

To add a set to your config, use Rector\PHPUnit\Set\PHPUnitSetList class and pick one of constants:

use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->sets([
        PHPUnitSetList::PHPUNIT_90,
    ]);
};

Learn Rector Faster

Rector is a tool that we develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:

Both ways support us to and improve Rector in sustainable way by learning from practical projects.