Testing
Questi contenuti non sono ancora disponibili nella tua lingua.
This package provides a consistent set of Composer scripts for local validation.
Tool references:
- Composer Require Checker for dependency definition checks.
- Easy Coding Standard (ECS) for coding standards.
- Infection for mutation testing.
- PHPStan for static analysis.
- PHPUnit for unit tests.
- Rector for automated refactoring.
Automated refactoring (Rector)
Section titled “Automated refactoring (Rector)”Run Rector to apply automated code refactoring.
composer rectorCoding standards (ECS)
Section titled “Coding standards (ECS)”Run Easy Coding Standard (ECS) and apply fixes.
composer ecsDependency definition check
Section titled “Dependency definition check”Verify that runtime dependencies are correctly declared in composer.json.
composer check-dependenciesMutation testing (Infection)
Section titled “Mutation testing (Infection)”Run mutation testing.
composer mutationRun mutation testing with static analysis enabled.
composer mutation-staticStatic analysis (PHPStan)
Section titled “Static analysis (PHPStan)”Run static analysis.
composer staticUnit tests (PHPUnit)
Section titled “Unit tests (PHPUnit)”Run the full test suite.
composer testsPassing extra arguments
Section titled “Passing extra arguments”Composer scripts support forwarding additional arguments using --.
Run PHPUnit with code coverage report generation.
composer tests -- --coverage-html code_coverageRun PHPStan with a different memory limit.
composer static -- --memory-limit=512M