test: Skip DebuggerTest::testExportVarRecursion() in PHP 8.1+.

PHP 8.1+, $GLOBALS no longer has $GLOBALS as an element.
This commit is contained in:
Koji Tanaka 2023-02-09 23:45:06 +09:00 committed by Kamil Wylegala
parent ce3e0c35e5
commit 9115ec765f

View file

@ -642,6 +642,10 @@ TEXT;
* @return void * @return void
*/ */
public function testExportVarRecursion() { 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); $output = Debugger::exportVar($GLOBALS);
$this->assertStringContainsString("'GLOBALS' => [recursion]", $output); $this->assertStringContainsString("'GLOBALS' => [recursion]", $output);
} }