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

Add test assertion for response instance #8102

Merged

Conversation

robbieaverill
Copy link
Contributor

@robbieaverill robbieaverill commented May 29, 2018

This prevents middlewares that return null (like the example delegate in this test) from killing a testsuite

Example error without this:

Fatal error: Call to a member function getHeader() on null in /Users/robbieaverill/dev/releases/release-cwp_cwp-recipe-kitchen-sink-2.0.0-rc4/vendor/silverstripe/framework/tests/php/Control/DirectorTest.php on line 596

Also adds some config resets to ensure global state pollution doesn't affect the tests when running in a CWP 2.0 context

This prevents middlewares that return null (like the example delegate in this test) from killing a testsuite
@chillu chillu merged commit 48304fd into silverstripe:4.1 Jun 8, 2018
@chillu chillu deleted the pulls/4.1/response-assertion branch June 8, 2018 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants