X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FSpecialPageTest.php;h=245cdffdd413d7d9d2aa10fee221a07ce7151424;hb=2bcbc311b49af248b9f4882ae5da787a8b91a8a5;hp=0ee335a6095da52612ed57d651b7d18b9ddb00e8;hpb=c131c00ea5776c986847852314b9305b7738d329;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' ) ); }