PHPStan Rule Test Helper


The PHPStan Rule Test Helper builds on PHPStan's own test harness for custom rules. Expected errors are marked with // ERROR comments in the fixture files themselves, so there are no line numbers to update when a fixture changes. The expected error message can also be defined once in the test case, rather than repeated for every violation.

View on GitHub


Related articles