Skip to content

Commit

Permalink
DEP Use PHPUnit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Sep 9, 2024
1 parent 7ec468a commit 7781e5c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"bringyourownideas/silverstripe-maintenance": "^4"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^11.3",
"squizlabs/php_codesniffer": "^3",
"silverstripe/standards": "^1",
"phpstan/extension-installer": "^1.3"
Expand Down
2 changes: 1 addition & 1 deletion tests/Extensions/CheckComposerUpdatesExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function setUp(): void
$this->task = UpdatePackageInfoTask::create();

// Create a partial mock of the update checker
$updateCheckerMock = $this->getMockBuilder(UpdateChecker::class)->setMethods(['checkForUpdates'])->getMock();
$updateCheckerMock = $this->getMockBuilder(UpdateChecker::class)->onlyMethods(['checkForUpdates'])->getMock();
$this->task->setUpdateChecker($updateCheckerMock);

$this->allowedTypes = ['silverstripe-module', 'silverstripe-vendormodule', 'silverstripe-theme'];
Expand Down
4 changes: 2 additions & 2 deletions tests/UpdateCheckerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ protected function setUp(): void
$composer = $this->getMockBuilder(Composer::class)->getMock();
$composerLoader = $this->getMockBuilder(ComposerLoader::class)
->disableOriginalConstructor()
->setMethods(['getComposer'])
->onlyMethods(['getComposer'])
->getMock();
$composerLoader->expects($this->once())->method('getComposer')->will($this->returnValue($composer));
Injector::inst()->registerService($composerLoader, ComposerLoader::class);

// Partially mock UpdateChecker
$this->updateChecker = $this->getMockBuilder(UpdateChecker::class)
->setMethods(['findLatestPackage'])
->onlyMethods(['findLatestPackage'])
->getMock();
}

Expand Down

0 comments on commit 7781e5c

Please sign in to comment.