diff --git a/tests/phpunit/permissions/MinervaPagePermissionsTest.php b/tests/phpunit/permissions/MinervaPagePermissionsTest.php index e8fb8d5a3..6f20b9253 100644 --- a/tests/phpunit/permissions/MinervaPagePermissionsTest.php +++ b/tests/phpunit/permissions/MinervaPagePermissionsTest.php @@ -32,8 +32,7 @@ class MinervaPagePermissionsTest extends MediaWikiIntegrationTestCase { $isSuperUser = false ) { $languageHelper = $this->createMock( LanguagesHelper::class ); - $languageHelper->expects( $this->any() ) - ->method( 'doesTitleHasLanguagesOrVariants' ) + $languageHelper->method( 'doesTitleHasLanguagesOrVariants' ) ->willReturn( $hasOtherLanguagesOrVariants ); $user = $user ?? $this->getTestUser()->getUser(); @@ -148,10 +147,10 @@ class MinervaPagePermissionsTest extends MediaWikiIntegrationTestCase { ->getMock(); $contentHandler->method( 'supportsDirectEditing' ) - ->will( $this->returnValue( $supportsDirectEditing ) ); + ->willReturn( $supportsDirectEditing ); $contentHandler->method( 'supportsDirectApiEditing' ) - ->will( $this->returnValue( $supportsDirectApiEditing ) ); + ->willReturn( $supportsDirectApiEditing ); $perms = $this->buildPermissionsObject( Title::newFromText( 'test' ), null, [], $contentHandler ); diff --git a/tests/phpunit/skins/SkinMinervaTest.php b/tests/phpunit/skins/SkinMinervaTest.php index 7cf98c29d..bd9fe8016 100644 --- a/tests/phpunit/skins/SkinMinervaTest.php +++ b/tests/phpunit/skins/SkinMinervaTest.php @@ -60,7 +60,7 @@ class SkinMinervaTest extends MediaWikiIntegrationTestCase { ->getMock(); $outputPage->expects( $this->once() ) ->method( 'getCategoryLinks' ) - ->will( $this->returnValue( $categoryLinks ) ); + ->willReturn( $categoryLinks ); $this->overrideSkinOptions( [ SkinOptions::CATEGORIES => true ] );