Closed
Description
Describe the bug
Am I missing something obvious? FeatureResponse::isOk
looks like this:
// Only 200 and 300 range status codes
// are considered valid.
if ($this->response->getStatusCode() >= 400 || $this->response->getStatusCode() < 200)
{
return false;
}
// Empty bodies are not considered valid.
if (empty($this->response->getBody()))
{
return false;
}
... but won't redirects (300 statuses) always have an empty body? Regardless of the always, if you use the standard return redirect()->to(...
in a controller and then test it with FeatureTestCase
then the resulting assertOk()
will fail, which seems like a mistake to me.
CodeIgniter 4 version
develop
Affected module(s)
FeatureResponse
Expected behavior, and steps to reproduce if appropriate
See above
Context
- OS: Linux
- Web server: Apache
- PHP version: 7.3
Activity