3use Wikimedia\TestingAccessWrapper;
17 'ChangesListSpecialPageQuery',
22 'wgDefaultUserOptions',
24 'extendwatchlist' => 1,
25 'watchlistdays' => 3.0,
26 'watchlisthideanons' => 0,
27 'watchlisthidebots' => 0,
28 'watchlisthideliu' => 0,
29 'watchlisthideminor' => 0,
30 'watchlisthideown' => 0,
31 'watchlisthidepatrolled' => 0,
32 'watchlisthidecategorization' => 1,
33 'watchlistreloadautomatically' => 0,
34 'watchlistunwatchlinks' => 0,
49 $this->setExpectedException( UserNotLoggedIn::class );
56 $this->assertContains(
'(nowatchlist)',
$html );
63 $page = TestingAccessWrapper::newFromObject(
69 $fauxRequest =
new FauxRequest( $inputParams,
false );
72 foreach ( $preferences as $key =>
$value ) {
73 $user->setOption( $key,
$value );
76 $context->setRequest( $fauxRequest );
80 $page->registerFilters();
81 $formOptions = $page->getDefaultOptions();
82 $page->fetchOptionsFromRequest( $formOptions );
86 $formOptions->getAllValues(),
96 $page = TestingAccessWrapper::newFromObject(
100 $page->registerFilters();
103 $wikiDefaults = $page->getDefaultOptions()->getAllValues();
105 $allFalse = $wikiDefaults;
107 foreach ( $allFalse as $key => &
$value ) {
115 $allFalse[
'extended'] =
true;
135 'hideanons' =>
false,
137 'userExpLevel' =>
'registered'
140 'watchlisthideminor' => 1,
141 'watchlisthidebots' => 0,
143 'watchlisthideanons' => 1,
144 'watchlisthideliu' => 0,
156 'hideminor' =>
false,
158 'hideanons' =>
false,
160 'userExpLevel' =>
'unregistered'
163 'watchlisthideminor' => 0,
164 'watchlisthidebots' => 1,
166 'watchlisthideanons' => 0,
167 'watchlisthideliu' => 1,
172 'action' =>
'submit',
An IContextSource implementation which will inherit context from another source but allow individual ...
WebRequest clone which takes values from a provided array.
Base class for testing special pages.
executeSpecialPage( $subPage='', WebRequest $request=null, $language=null, User $user=null)
testUserWithNoWatchedItems_displaysNoWatchlistMessage()
testFetchOptionsFromRequest( $expectedValues, $preferences, $inputParams)
provideFetchOptionsFromRequest
newSpecialPage()
Returns a new instance of the special page under test.
provideFetchOptionsFromRequest()
testNotLoggedIn_throwsException()
A special page that lists last changes made to the wiki, limited to user-defined list of titles.
Wraps the user object, so we can also retain full access to properties like password if we log in via...
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
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