Skip to content

Use PHPUnit's TestListeners to log extra detail when an assertion fails #7

@benfterpay

Description

@benfterpay

According to this reference, PHPUnit can trigger a callback when an assertion fails. This could allow us to log additional detail (such as the response payload, or errorId and CF-Ray ID) when the API responds with an error unexpectedly. Such an outcome would be much more valuable than just "Failed asserting that 500 matches expected 201", as per this test run.

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