I was reading this question and as a result I can successfully test for headers of the form:
header('X-Something: value');
header('Content-Type: text/html');
However, I have code that sets the response code, and I'd like to verify this is working correctly in my units tests too, but they don't come back in the xdebug_get_headers
return value. The calls look like:
header('HTTP/1.1 201 Created');
header('HTTP/1.1 422 Unprocessable Entity');
Is there anyway to check for this header as well? Or do I just have to rely on the rest of the return values to prove my controller is working