[Halo] add a Trait to test HTTP headers
Review Request #326 — Created July 18, 2014 and updated — Latest diff uploaded
| Information | |
|---|---|
| tardypad | |
| Lunr | |
| tardypad:http_headers_test_trait | |
| 327 | |
| Reviewers | |
| lunr | |
Can be used to properly test all headers, including the ones setting the return code, using xdebug_get_headers() Main problems that were faced with previous tests of headers - xdebug_get_headers doesn't return headers of type 'HTTP/1.1 return_code message' - use of http_response_code was not tested as well The trait can be improved if you think it's needed: - take into account response code when set via the 3rd parameter of the 'header' function - take into account headers with same name and assert on the final result
Traits can't be unit tested using the current phpunit version 3.7.37
