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 FeatureTestCase allows simulating an app run and gathering the output for testing purposes. If a controller returns the output instead of echoing it (e.g. return view('Home');) it isn't cleaning the output buffer correctly causing risky tests with the following warning:
Test code or tested code did not (only) close its own output buffers
CodeIgniter 4 version develop latest
Affected module(s) FeatureTestTrait
Expected behavior, and steps to reproduce if appropriate
Controller:
class Home extends BaseController
{
public function index()
{
return view('home');
}
Test:
class HomeTest extends FeatureTestCase
{
public function testGetHome()
{
$result = $this->get('/');
$result->assertStatus(200);
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 4, 2020
Describe the bug
FeatureTestCase
allows simulating an app run and gathering the output for testing purposes. If a controller returns the output instead of echoing it (e.g.return view('Home');
) it isn't cleaning the output buffer correctly causing risky tests with the following warning:CodeIgniter 4 version
develop
latestAffected module(s)
FeatureTestTrait
Expected behavior, and steps to reproduce if appropriate
Controller:
Test:
Context
The text was updated successfully, but these errors were encountered: