From 9115ec765f27da73d652ee9724bbabb957d24bd6 Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Thu, 9 Feb 2023 23:45:06 +0900 Subject: [PATCH] test: Skip DebuggerTest::testExportVarRecursion() in PHP 8.1+. PHP 8.1+, $GLOBALS no longer has $GLOBALS as an element. --- lib/Cake/Test/Case/Utility/DebuggerTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index 6e700e157..a14fd8110 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -642,6 +642,10 @@ TEXT; * @return void */ public function testExportVarRecursion() { + $this->skipIf( + version_compare(PHP_VERSION, '8.1.0', '>='), + 'PHP 8.1+, $GLOBALS no longer has $GLOBALS as an element.' + ); $output = Debugger::exportVar($GLOBALS); $this->assertStringContainsString("'GLOBALS' => [recursion]", $output); }