From 1e21c2bbb2707e293f2922cd11bcb68a7071d82b Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 27 Feb 2023 10:07:04 +0000 Subject: [PATCH] Make tests compatible with PHPUnit version 9.6 --- .../DependencyGuesser/DependencyGuesserTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ComposerRequireCheckerTest/DependencyGuesser/DependencyGuesserTest.php b/test/ComposerRequireCheckerTest/DependencyGuesser/DependencyGuesserTest.php index 066dabe8..d502e28c 100644 --- a/test/ComposerRequireCheckerTest/DependencyGuesser/DependencyGuesserTest.php +++ b/test/ComposerRequireCheckerTest/DependencyGuesser/DependencyGuesserTest.php @@ -25,7 +25,7 @@ public function testGuessExtJson(): void $this->markTestSkipped('extension json is not available'); } - $result = $this->guesser->__invoke('json_decode'); + $result = iterator_to_array($this->guesser->__invoke('json_decode')); $this->assertNotEmpty($result); $this->assertContains('ext-json', $result); } @@ -40,7 +40,7 @@ public function testCoreExtensionsResolvesToPHP(): void { $options = new Options(['php-core-extensions' => ['SPL', 'something-else']]); $this->guesser = new DependencyGuesser($options); - $result = $this->guesser->__invoke('RecursiveDirectoryIterator'); + $result = iterator_to_array($this->guesser->__invoke('RecursiveDirectoryIterator')); $this->assertNotEmpty($result); $this->assertContains('php', $result); }