Skip to content

Commit 6de79e4

Browse files
committed
~ fix FeatureTestCaseTest output buffer where not closed correctly
Signed-off-by: Christoph Potas <christoph286@googlemail.com>
1 parent b3bc80e commit 6de79e4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

system/Test/FeatureTestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class FeatureTestCase extends CIDatabaseTestCase
3434
*/
3535
protected $session = [];
3636

37+
protected $clean = true;
38+
3739
/**
3840
* Sets a RouteCollection that will override
3941
* the application's route collection.
@@ -115,7 +117,7 @@ public function call(string $method, string $path, array $params = null)
115117
->run($this->routes, true);
116118

117119
// Clean up any open output buffers
118-
if (ob_get_level() > 0)
120+
if (ob_get_level() > 0 && $this->clean)
119121
{
120122
ob_end_clean();
121123
}

tests/system/Test/FeatureTestCaseTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public function setUp()
1414
parent::setUp();
1515

1616
$this->skipEvents();
17+
$this->clean = false;
1718
}
1819

1920
public function testCallGet()

0 commit comments

Comments
 (0)