From 523fc7adbf191be14edb3a7f11ca5f082646fca8 Mon Sep 17 00:00:00 2001 From: Roland Soos Date: Fri, 2 Aug 2024 07:40:13 +0200 Subject: [PATCH] Update test-optimization.php --- plugins/optimization-detective/tests/test-optimization.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/optimization-detective/tests/test-optimization.php b/plugins/optimization-detective/tests/test-optimization.php index a1a621fac5..f212be8415 100644 --- a/plugins/optimization-detective/tests/test-optimization.php +++ b/plugins/optimization-detective/tests/test-optimization.php @@ -109,6 +109,8 @@ function ( $buffer ) use ( $template_override, $filter_override, &$filter_count ob_clean(); // Note the lack of flush here. echo $template_override; // This should get passed into the od_template_output_buffer filter. + ob_end_flush(); + $buffer = ob_get_clean(); // Get the buffer from our wrapper output buffer. $this->assertSame( 1, $filter_count, 'Expected filter to be called once.' );