Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
benfterpay opened this issue Feb 16, 2021 · 1 comment

Comments

@benfterpay
Copy link
Contributor

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.

@cecil-m
Copy link

cecil-m commented Jun 12, 2021

Hi @benfterpay,
What would be the desired outcome? (i.e: log it to sentry?)
also, the logs for the test run have expired and are no longer available :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants