diff --git a/tests/ConfigurationTest.php b/tests/ConfigurationTest.php index 1c057a5..2237da5 100644 --- a/tests/ConfigurationTest.php +++ b/tests/ConfigurationTest.php @@ -5,7 +5,6 @@ use Composer\Composer; use Composer\IO\NullIO; use Composer\Package\RootPackageInterface; -use Composer\PartialComposer; use Composer\Plugin\PluginManager; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\TestCase; @@ -440,7 +439,10 @@ private function createComposerMock() }); $pluginManager = $this->createMock(PluginManager::class); - $globalComposer = $this->createMock(PartialComposer::class); + // PartialComposer is returned for 2.3.0+ composer + $globalComposer = class_exists('Composer\PartialComposer') + ? $this->createMock('Composer\PartialComposer') + : $this->createMock('Composer\Composer'); $globalPackageInterface = $this->createMock(RootPackageInterface::class); $composer->method('getPluginManager')->willReturn($pluginManager);