You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
MGatner
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Jun 7, 2020
Describe the bug
Am I missing something obvious?
FeatureResponse::isOk
looks like this:... 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 withFeatureTestCase
then the resultingassertOk()
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
The text was updated successfully, but these errors were encountered: