3use Wikimedia\TestingAccessWrapper;
17 'ChangesListSpecialPageFilters',
22 'SpecialWatchlistQuery',
27 'ChangesListSpecialPageQuery',
32 'wgDefaultUserOptions',
34 'extendwatchlist' => 1,
35 'watchlistdays' => 3.0,
36 'watchlisthideanons' => 0,
37 'watchlisthidebots' => 0,
38 'watchlisthideliu' => 0,
39 'watchlisthideminor' => 0,
40 'watchlisthideown' => 0,
41 'watchlisthidepatrolled' => 0,
42 'watchlisthidecategorization' => 1,
43 'watchlistreloadautomatically' => 0,
44 'watchlistunwatchlinks' => 0,
59 $this->setExpectedException( UserNotLoggedIn::class );
66 $this->assertContains(
'(nowatchlist)',
$html );
73 $page = TestingAccessWrapper::newFromObject(
79 $fauxRequest =
new FauxRequest( $inputParams,
false );
82 foreach ( $preferences as $key =>
$value ) {
83 $user->setOption( $key,
$value );
86 $context->setRequest( $fauxRequest );
90 $page->registerFilters();
91 $formOptions = $page->getDefaultOptions();
92 $page->fetchOptionsFromRequest( $formOptions );
96 $formOptions->getAllValues(),
106 $page = TestingAccessWrapper::newFromObject(
111 'ChangesListSpecialPageFilters',
115 $page->registerFilters();
118 $wikiDefaults = $page->getDefaultOptions()->getAllValues();
120 $allFalse = $wikiDefaults;
122 foreach ( $allFalse as $key => &
$value ) {
130 $allFalse[
'extended'] =
true;
150 'hideanons' =>
false,
152 'userExpLevel' =>
'registered'
155 'watchlisthideminor' => 1,
156 'watchlisthidebots' => 0,
158 'watchlisthideanons' => 1,
159 'watchlisthideliu' => 0,
171 'hideminor' =>
false,
173 'hideanons' =>
false,
175 'userExpLevel' =>
'unregistered'
178 'watchlisthideminor' => 0,
179 'watchlisthidebots' => 1,
181 'watchlisthideanons' => 0,
182 'watchlisthideliu' => 1,
187 '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