Go to the documentation of this file.
17 'wgScript' =>
'/index.php',
28 $this->assertEquals( $expected,
$title );
33 array(
'UserLogin',
'Userlogin' )
43 $this->assertEquals( $expected,
$title );
52 $this->assertEquals( $expected,
$title );
65 $specialPage =
new SpecialPage(
'Watchlist',
'viewmywatchlist' );
68 $specialPage->getContext()->setUser(
$user );
71 $this->setExpectedException(
'UserNotLoggedIn', $expected );
73 if ( $reason ===
'blank' &&
$title ===
'blank' ) {
74 $specialPage->requireLogin();
76 $specialPage->requireLogin( $reason,
$title );
83 $msg =
wfMessage(
'loginreqlink' )->inLanguage( $lang )->escaped();
84 $loginLink =
'<a href="/index.php?title=Special:UserLogin&returnto=Special%3AWatchlist"'
85 .
' title="Special:UserLogin">' . $msg .
'</a>';
87 $expected1 =
wfMessage(
'exception-nologin-text-manual' )
88 ->params( $loginLink )->inLanguage( $lang )->text();
90 $expected2 =
wfMessage(
'about' )->inLanguage( $lang )->text();
93 array( $expected1,
null,
null ),
94 array( $expected2,
'about',
null ),
96 array( $expected2,
'about',
'about' ),
98 array( $expected1,
'blank',
'blank' )
103 $specialPage =
new SpecialPage(
'Watchlist',
'viewmywatchlist' );
106 $specialPage->getContext()->setUser(
$user );
108 $specialPage->requireLogin();
111 $this->assertTrue(
true );
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
static newFromId( $id)
Static factory method for creation from a given user ID.
testInvalidGetTitleFor()
@expectedException PHPUnit_Framework_Error_Notice
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
requireLoginAnonProvider()
getTitleForWithWarningProvider()
testGetTitleFor( $expectedName, $name)
@dataProvider getTitleForProvider
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
presenting them properly to the user as errors is done by the caller $title
Allows to change the fields on the form that will be generated $name
testRequireLoginAnon( $expected, $reason, $title)
@dataProvider requireLoginAnonProvider
Parent class for all special pages.
testGetTitleForWithWarning( $expected, $name)
@expectedException PHPUnit_Framework_Error_Notice @dataProvider getTitleForWithWarningProvider
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
static factory( $code)
Get a cached or new language object for a given language code.
testRequireLoginNotAnon()