diff --git a/tests/Tasks/UpdatePackageInfoTest.php b/tests/Tasks/UpdatePackageInfoTest.php index 2319784..7b5a704 100644 --- a/tests/Tasks/UpdatePackageInfoTest.php +++ b/tests/Tasks/UpdatePackageInfoTest.php @@ -50,7 +50,7 @@ public function testPackagesAreAddedCorrectly() $frameworkVersion = VersionProvider::singleton()->getModuleVersion('silverstripe/framework'); $composerLoader = $this->getMockBuilder(ComposerLoader::class) - ->setMethods(['getLock'])->getMock(); + ->setMethods(['getLock', 'getPackages'])->getMock(); $composerLoader->expects($this->any())->method('getLock')->will($this->returnValue(json_decode(<<expects($this->any())->method('getPackages')->will($this->returnValue([])); + $task->setComposerLoader($composerLoader); $task->run(null);