Skip to content

Latest commit

History

History
97 lines (64 loc) 路 1.92 KB

File metadata and controls

97 lines (64 loc) 路 1.92 KB

Testing

This package provides a consistent set of Composer scripts for local validation.

Tool references:

Automated refactoring (Rector)

Run Rector to apply automated code refactoring.

composer rector

Validate Rector without modifying files.

composer rector -- --dry-run

Coding standards (ECS)

Run Easy Coding Standard (ECS) and apply fixes.

composer ecs

Dependency definition check

Verify that runtime dependencies are correctly declared in composer.json.

composer check-dependencies

Mutation testing (Infection)

Run mutation testing.

composer mutation

Run mutation testing with static analysis enabled.

composer mutation-static

Static analysis (PHPStan)

Run static analysis.

composer static

Unit tests (PHPUnit)

Run the full test suite.

composer tests

Passing extra arguments

Composer scripts support forwarding additional arguments using --.

Run PHPUnit with code coverage report generation.

composer tests -- --coverage-html code_coverage

Run PHPStan with a different memory limit.

composer static -- --memory-limit=512M

Next steps