Skip to content

Commit

Permalink
MNT Fix PHPUnit 12 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Sep 19, 2024
1 parent ecd57b0 commit f215d57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions tests/Util/ApiLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,14 @@ protected function getLoader($cacheMock = false)
$cacheMock->expects($this->any())->method('set')->willReturn(true);
}

$loader = $this->getMockBuilder(ApiLoader::class)
->getMockForAbstractClass();
$loader = new class extends ApiLoader {
protected function getCacheKey()
{
return 'cacheKey';
}
};

$loader->setCache($cacheMock);
$loader->expects($this->any())->method('getCacheKey')->willReturn('cacheKey');

return $loader;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Util/SupportedAddonsLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testCallbackReturnsAddonsFromBody()
$this->loader->expects($this->once())
->method('doRequest')
->with($this->isType('string'), $this->isType('callable'))
->will($this->returnArgument(1));
->willReturnArgument(1);

$result = $this->loader->getAddonNames();
$mockResponse = [
Expand Down

0 comments on commit f215d57

Please sign in to comment.