From 1a570e4b8c56cf22bc6d475eb2a1d28498e2a2c8 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 14 Feb 2020 14:52:56 +0700 Subject: [PATCH] disable buffer check on "testing" environment --- app/Config/Events.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/Config/Events.php b/app/Config/Events.php index cfdb53734186..085cc4ac0cd7 100644 --- a/app/Config/Events.php +++ b/app/Config/Events.php @@ -20,14 +20,17 @@ */ Events::on('pre_system', function () { - while (\ob_get_level() > 0) + if (ENVIRONMENT !== 'testing') { - \ob_end_flush(); - } + while (\ob_get_level() > 0) + { + \ob_end_flush(); + } - \ob_start(function ($buffer) { - return $buffer; - }); + \ob_start(function ($buffer) { + return $buffer; + }); + } /* * --------------------------------------------------------------------