19 'wgScript' =>
'/index.php',
27 $title = SpecialPage::getTitleFor( $name );
28 $expected = Title::makeTitle(
NS_SPECIAL, $expectedName );
34 [
'UserLogin',
'Userlogin' ]
42 $title = SpecialPage::getTitleFor(
'cat' );
43 $expected = Title::makeTitle(
NS_SPECIAL,
'Cat' );
52 $title = SpecialPage::getTitleFor( $name );
58 [ Title::makeTitle(
NS_SPECIAL,
'UserLogin' ),
'UserLogin' ]
66 $specialPage =
new SpecialPage(
'Watchlist',
'viewmywatchlist' );
69 $specialPage->getContext()->setUser( $user );
70 $specialPage->getContext()->setLanguage( Language::factory(
'en' ) );
76 [ $specialPage,
'requireLogin' ],
84 $expected1 =
wfMessage(
'exception-nologin-text' )->inLanguage(
$lang )->text();
95 $specialPage =
new SpecialPage(
'Watchlist',
'viewmywatchlist' );
98 $specialPage->getContext()->setUser( $user );
100 $specialPage->requireLogin();
107 yield [ 0, 20,
false,
false ];
108 yield [ 17, 20,
false,
false ];
109 yield [ 0, 17,
false,
false ];
110 yield [ 0, 20,
true,
'Foo' ];
111 yield [ 17, 20,
true,
'Föö_Bär' ];
121 $specialPage = TestingAccessWrapper::newFromObject( $specialPage );
123 $html = $specialPage->buildPrevNextNavigation(
136 foreach ( $links as $a ) {
150 'limit=' . $limit .
'&offset=' .
max( 0, $offset - $limit ) .
'&',
153 $this->
assertContains(
'title="(prevn-title: ' . $limit .
')"', $links[$i] );
161 'limit=' . $limit .
'&offset=' . ( $offset + $limit ) .
'&',
164 $this->
assertContains(
'title="(nextn-title: ' . $limit .
')"', $links[$i] );
172 $this->
assertContains(
'limit=20&offset=' . $offset, $links[$i] );
178 $this->
assertContains(
'limit=500&offset=' . $offset, $links[$i] );
179 $this->
assertContains(
'title="(shown-title: 500)"', $links[$i] );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfUrlencode( $s)
We want some things to be included as literal characters in our title URLs for prettiness,...
testRequireLoginNotAnon()
testBuildPrevNextNavigation( $offset, $limit, $atEnd, $subPage)
provideBuildPrevNextNavigation
requireLoginAnonProvider()
testInvalidGetTitleFor()
PHPUnit_Framework_Error_Notice.
provideBuildPrevNextNavigation()
testGetTitleForWithWarning( $expected, $name)
PHPUnit_Framework_Error_Notice getTitleForWithWarningProvider.
testGetTitleFor( $expectedName, $name)
getTitleForProvider
getTitleForWithWarningProvider()
testRequireLoginAnon( $expected, $reason, $title)
requireLoginAnonProvider
Parent class for all special pages.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static newFromId( $id)
Static factory method for creation from a given user ID.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead 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 "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
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 & $html
processing should stop and the error should be shown to the user * false
if(!isset( $args[0])) $lang