Skip to content

Latest commit

 

History

History
90 lines (58 loc) · 1.92 KB

testing.md

File metadata and controls

90 lines (58 loc) · 1.92 KB

Testing

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

The test suite covers request validation, result negotiation, partial filtering, callback laziness, all supported prop metadata, modifier combinations, JSON normalization, failure rescue, redirects, and version conflicts. Tests do not boot a framework or create framework HTTP objects.

Tool references:

Automated refactoring (Rector)

Run Rector to apply automated code refactoring.

composer rector

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

← Back to documentation