Expand description
Test utilities for fixture-based testing.
Provides helpers to run .phpt fixture files against the analyzer
and compare actual vs expected issues.
Structs§
- Expected
Issue - One expected issue from a
.phptfixture’s===expect===section.
Functions§
- assert_
issue - Assert that
issuescontains at least one issue with the exactIssueKindatlineandcol_start. Panics with the full issue list on failure. - assert_
issue_ kind - Assert that
issuescontains at least one issue whosekind.name()equalskind_name, atlineandcol_start. Use this when the exact IssueKind field values are complex (e.g. type-format strings in InvalidArgument). - assert_
no_ issue - Assert that
issuescontains no issue whosekind.name()equalskind_name. Panics with the matching issues on failure. - check
- Run the full analyzer on an inline PHP string. Creates a unique temp file, analyzes it, deletes it, and returns all unsuppressed issues.
- parse_
phpt - Parse a
.phptfixture file into(php_source, expected_issues). - run_
fixture - Run a
.phptfixture file: parse, analyze, and assert the issues match the===expect===section exactly (no missing, no unexpected).