Skip to content

Commit

Permalink
Merge pull request #395 from fredden/phpunit-9.6-compat
Browse files Browse the repository at this point in the history
Make tests compatible with PHPUnit version 9.6.2
  • Loading branch information
Ocramius authored Feb 27, 2023
2 parents 282533b + 40bdcd6 commit e128a32
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use PHPUnit\Framework\TestCase;

use function extension_loaded;
use function iterator_to_array;

final class DependencyGuesserTest extends TestCase
{
Expand All @@ -25,7 +26,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);
}
Expand All @@ -40,7 +41,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);
}
Expand Down

0 comments on commit e128a32

Please sign in to comment.