From a1ae4a2f758467e511c43e60c0e366480a61d78a Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Thu, 28 Dec 2023 23:40:07 +0800 Subject: [PATCH] test: strip colors on xdebug.cli_color=2 --- tests/system/Commands/Utilities/ConfigCheckTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/system/Commands/Utilities/ConfigCheckTest.php b/tests/system/Commands/Utilities/ConfigCheckTest.php index e551a1ae94c6..00066e472187 100644 --- a/tests/system/Commands/Utilities/ConfigCheckTest.php +++ b/tests/system/Commands/Utilities/ConfigCheckTest.php @@ -126,6 +126,13 @@ public function testGetVarDump() true ) ) { + // Xdebug force adds colors on xdebug.cli_color=2 + $output = preg_replace( + '/(\033\[[0-9;]+m)|(\035\[[0-9;]+m)/u', + '', + $output + ); + // Xdebug overloads var_dump(). $this->assertStringContainsString( 'class Config\App#',