From ccead6d685394f980042d05c6e95efca83c79e4b Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 21 Oct 2024 10:55:46 +1300 Subject: [PATCH] DEP Use stable version of silverstripe/supported-modules --- composer.json | 2 +- tests/Tasks/UpdatePackageInfoTest.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ee8316e..c478f28 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php": "^8.1", "silverstripe/framework": "^5.4", "silverstripe/reports": "^5", - "silverstripe/supported-modules": "dev-main", + "silverstripe/supported-modules": "^1", "symbiote/silverstripe-queuedjobs": "^5", "guzzlehttp/guzzle": "^7.5" }, diff --git a/tests/Tasks/UpdatePackageInfoTest.php b/tests/Tasks/UpdatePackageInfoTest.php index 2319784..c8425f7 100644 --- a/tests/Tasks/UpdatePackageInfoTest.php +++ b/tests/Tasks/UpdatePackageInfoTest.php @@ -48,7 +48,13 @@ public function testPackagesAreAddedCorrectly() { $task = UpdatePackageInfoTask::create(); - $frameworkVersion = VersionProvider::singleton()->getModuleVersion('silverstripe/framework'); + /** @var VersionProvider $versionProvider */ + $versionProvider = $this->getMockBuilder(VersionProvider::class) + ->setMethods(['getModuleVersion']) + ->getMock(); + $versionProvider->expects($this->any())->method('getModuleVersion')->will($this->returnValue('5.9.9')); + $frameworkVersion = $versionProvider->getModuleVersion('silverstripe/framework'); + $composerLoader = $this->getMockBuilder(ComposerLoader::class) ->setMethods(['getLock'])->getMock(); $composerLoader->expects($this->any())->method('getLock')->will($this->returnValue(json_decode(<<