Skip to content

Rewrite all tests to use plain comparisons and show diffs #5043

@Daimona

Description

@Daimona

Most of phan's tests use pattern matching and assertRegExp. While this provides the benefit of not hardcoding paths etc., it is also very inconvenient in case of test failures, because there isn't a good way to compare the expected and actual results to see the differences, if not by writing the new results to the test file and doing a git diff or other similar approaches.

Instead, it would be nice to just use plain strings for matching. The test framework can still perform some input normalizations, such as for path separators, to ensure consistent output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions