From 60d64580809b763bc6ca3155c0a6a756b26d27a1 Mon Sep 17 00:00:00 2001 From: Fonata Date: Mon, 2 Apr 2018 14:38:03 +0200 Subject: [PATCH] PHPUnit: prevent output from download.php to leak --- tests/methods/ConstructTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/methods/ConstructTest.php b/tests/methods/ConstructTest.php index c9d9db4..35ddd33 100644 --- a/tests/methods/ConstructTest.php +++ b/tests/methods/ConstructTest.php @@ -58,8 +58,9 @@ class ConstructTest extends TestCase { ob_start(); /** @noinspection PhpIncludeInspection */ require $script_file; + $ob_get_clean = ob_get_clean(); if ($script_file != 'download.php') { - $this->assertContains('', ob_get_clean()); + $this->assertContains('', $ob_get_clean); } } chdir('..');