From 0a53bbf891592936e701dafac3eae9c65cc24ac9 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 17 Jan 2017 17:08:54 +0100 Subject: [PATCH] #223 #224 Correcting `ob_start()` callback redundancy, restoring `ob_end_flush()` --- test/Response/SapiStreamEmitterTest.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/Response/SapiStreamEmitterTest.php b/test/Response/SapiStreamEmitterTest.php index 52c7c961..80697030 100644 --- a/test/Response/SapiStreamEmitterTest.php +++ b/test/Response/SapiStreamEmitterTest.php @@ -188,16 +188,20 @@ public function testEmitMemoryUsage($seekable, $maxBufferLength, $sizeBlocks, $m $response = $response->withHeader('Content-Range', 'bytes ' . $first . '-' . $last . '/*'); } - ob_start(function ($output) use (& $closureTrackMemoryUsage) { - call_user_func($closureTrackMemoryUsage); - return ""; - }, $maxBufferLength); + ob_start( + function () use (& $closureTrackMemoryUsage) { + $closureTrackMemoryUsage(); + + return ''; + }, + $maxBufferLength + ); gc_collect_cycles(); $this->emitter->emit($response, $maxBufferLength); - ob_end_clean(); + ob_end_flush(); gc_collect_cycles();