We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec942b1 commit 76e0d60Copy full SHA for 76e0d60
src/Illuminate/Testing/TestResponse.php
@@ -1491,11 +1491,17 @@ public function streamedContent()
1491
PHPUnit::fail('The response is not a streamed response.');
1492
}
1493
1494
- ob_start();
+ ob_start(function (string $buffer): string {
1495
+ $this->streamedContent .= $buffer;
1496
+
1497
+ return '';
1498
+ });
1499
1500
$this->sendContent();
1501
- return $this->streamedContent = ob_get_clean();
1502
+ ob_end_clean();
1503
1504
+ return $this->streamedContent;
1505
1506
1507
/**
0 commit comments