testo/bridge-rector) provides Rector rules to migrate test suites between PEST, PHPUnit, and Testo—a niche but critical use case for teams adopting or transitioning between testing frameworks.test() as PHPUnit test()).beforeEach) that require manual overrides?rector process in dry mode to identify unsupported patterns.v1.x).| Step | Action | Tools/Commands |
|---|---|---|
| 1. Setup | Install Rector + package, configure rector.php. |
composer require rector/rector testo/bridge-rector |
| 2. Dry Run | Test rules against a subset of files. | vendor/bin/rector process tests --dry-run |
| 3. Incremental | Apply rules to one test file/directory at a time. | vendor/bin/rector process tests/Unit |
| 4. Validation | Compare outputs, fix false positives. | phpunit, pest, manual inspection |
| 5. CI Update | Update test commands in composer.json/Makefile. |
phpunit → pest |
--diff flag to trace rule failures.--parallel..rectorignore to skip problematic files initially.test() vs. PHPUnit’s assert*).| Risk | Mitigation Strategy |
|---|---|
| Rule Misclassification | Manual review of converted tests. |
| Broken Assertions | Run parallel suites until confidence grows. |
| CI Pipeline Failures | Gradually replace test commands. |
| Unsupported Syntax | Fallback to manual conversion for critical tests. |
expect()).How can I help you explore Laravel packages today?