Skip to content

Commit 508ceb9

Browse files
committed
Cleared output buffering on exception (fixes marking tests as Risky with new Codeception & PHPUnit)
1 parent cef218e commit 508ceb9

File tree

1 file changed

+9
-3
lines changed
  • src/Arachne/Codeception/Util/Connector

1 file changed

+9
-3
lines changed

src/Arachne/Codeception/Util/Connector/Nette.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,15 @@ public function doRequest($request)
4444
$httpResponse = $this->container->getByType('Nette\Http\IResponse');
4545
$httpResponse->setCode(IResponse::S200_OK);
4646

47-
ob_start();
48-
$this->container->getByType('Nette\Application\Application')->run();
49-
$content = ob_get_clean();
47+
try {
48+
ob_start();
49+
$this->container->getByType('Nette\Application\Application')->run();
50+
$content = ob_get_clean();
51+
52+
} catch (\Exception $e) {
53+
ob_end_clean();
54+
throw $e;
55+
}
5056

5157
$code = $httpResponse->getCode();
5258
$headers = $httpResponse->getHeaders();

0 commit comments

Comments
 (0)