X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fphpunit%2Fincludes%2FSpecialPageTest.php;h=245cdffdd413d7d9d2aa10fee221a07ce7151424;hb=b52e1fe2f7e578a118a74f85cf20e5906432f662;hp=0ee335a6095da52612ed57d651b7d18b9ddb00e8;hpb=162d096eb5169f40dd68690a7e6588d2e47dd2a2;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/SpecialPageTest.php b/tests/phpunit/includes/SpecialPageTest.php index 0ee335a609..245cdffdd4 100644 --- a/tests/phpunit/includes/SpecialPageTest.php +++ b/tests/phpunit/includes/SpecialPageTest.php @@ -70,32 +70,23 @@ class SpecialPageTest extends MediaWikiTestCase { $this->setExpectedException( 'UserNotLoggedIn', $expected ); - if ( $reason === 'blank' && $title === 'blank' ) { - $specialPage->requireLogin(); - } else { - $specialPage->requireLogin( $reason, $title ); - } + // $specialPage->requireLogin( [ $reason [, $title ] ] ) + call_user_func_array( + array( $specialPage, 'requireLogin' ), + array_filter( array( $reason, $title ) ) + ); } public function requireLoginAnonProvider() { $lang = 'en'; - $msg = wfMessage( 'loginreqlink' )->inLanguage( $lang )->escaped(); - $loginLink = '' . $msg . ''; - - $expected1 = wfMessage( 'exception-nologin-text-manual' ) - ->params( $loginLink )->inLanguage( $lang )->text(); - + $expected1 = wfMessage( 'exception-nologin-text' )->inLanguage( $lang )->text(); $expected2 = wfMessage( 'about' )->inLanguage( $lang )->text(); return array( array( $expected1, null, null ), array( $expected2, 'about', null ), - array( $expected2, wfMessage( 'about' ), null ), array( $expected2, 'about', 'about' ), - array( $expected2, 'about', wfMessage( 'about' ) ), - array( $expected1, 'blank', 'blank' ) ); }