Skip to content

Commit

Permalink
Merge pull request #1468 from puschie286/fix_FeatureTestCaseTest
Browse files Browse the repository at this point in the history
Fix FeatureTestCaseTest output buffer
  • Loading branch information
jim-parry authored Nov 12, 2018
2 parents d72700b + 058c3bf commit e2e7193
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion system/Test/FeatureTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ class FeatureTestCase extends CIDatabaseTestCase
*/
protected $session = [];

/**
* Enabled auto clean op buffer after request call
*
* @var bool
*/
protected $clean = true;

/**
* Sets a RouteCollection that will override
* the application's route collection.
Expand Down Expand Up @@ -115,7 +122,7 @@ public function call(string $method, string $path, array $params = null)
->run($this->routes, true);

// Clean up any open output buffers
if (ob_get_level() > 0)
if (ob_get_level() > 0 && $this->clean)
{
ob_end_clean();
}
Expand Down
1 change: 1 addition & 0 deletions tests/system/Test/FeatureTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function setUp()
parent::setUp();

$this->skipEvents();
$this->clean = false;
}

public function testCallGet()
Expand Down

0 comments on commit e2e7193

Please sign in to comment.