The problem is that when nette tester runs the tests using a CGI
executable it expects HTTP error statuses, but because it's not a real
HTTP request, SERVER_PROTOCOL isn't set. I tried to fix this before
using `http_repsonse_code` which does the right thing, but it's not
always available, so I had to revert that. So instead I've changed it so
that it assumes that it's an HTTP request unless it knows for sure that
it's a command line run.
- Use `http_response_code` as it's a bit more robust than using `header`.
- Check errors against `error_reporting()`, so that error checks can be
ignored when appropriate.