mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +00:00
Use PHPUnit shortcuts where possible
This makes the tests a little easier to read, I would argue. any() is the default anyway. It doesn't add new information to the test. Change-Id: If4655ddea494f1054538a760802b583e17c0108e
This commit is contained in:
parent
1cf3de024f
commit
bb31754073
|
@ -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 );
|
||||
|
|
|
@ -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 ] );
|
||||
|
||||
|
|
Loading…
Reference in a new issue