21 $this->user_comment =
'<User comment about action>';
30 $row =
new stdClass();
32 $row->rc_timestamp =
'20150921134808';
33 $row->rc_deleted =
'bar';
39 'rc_timestamp' =>
'20150921134808',
40 'rc_deleted' =>
'bar',
42 $this->assertEquals( $expected, $rc->getAttributes() );
58 'a:1:{s:4:"root";a:2:{s:1:"A";i:1;s:1:"B";s:3:"two";}}'
83 $rc->
setAttribs( [
'rc_params' => $rawRcParams ] );
85 $actualParseParams = $rc->parseParams();
87 $this->assertEquals( $expectedParseParams, $actualParseParams );
96 [ 6000, time() - 3000, 0,
true ],
97 [ 3000, time() - 6000, 0,
false ],
98 [ 6000, time() - 3000, 6000,
true ],
99 [ 3000, time() - 6000, 6000,
true ],
143 ->disableOriginalConstructor()
162 $pageProps->expects( $this->once() )
163 ->method(
'getProperties' )
164 ->with( $categoryTitle,
'hiddencat' )
165 ->will( $this->returnValue( $isHidden ? [ $categoryTitle->getArticleID() =>
'' ] : [] ) );
175 $categoryTitle->getLatestRevID(),
176 $categoryTitle->getLatestRevID(),
181 $this->assertEquals( $isHidden, $rc->getParam(
'hidden-cat' ) );
183 ScopedCallback::consume( $scopedOverride );
static newFromName($name, $validate= 'valid')
Static factory method for creation from username.
Utility class for creating new RC entries.
static isInRCLifespan($timestamp, $tolerance=0)
Check whether the given timestamp is new enough to have a RC row with a given tolerance as the recent...
processing should stop and the error should be shown to the user * false
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
static newFromText($text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
testIsInRCLifespan($maxAge, $timestamp, $tolerance, $expected)
RecentChange::isInRCLifespan provideIsInRCLifespan.
static newForCategorization($timestamp, Title $categoryTitle, User $user=null, $comment, Title $pageTitle, $oldRevId, $newRevId, $lastTimestamp, $bot, $ip= '', $deleted=0)
Constructs a RecentChange object for the given categorization This does not call save() on the object...
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 true
testParseToRCType($rcType, $type)
provideRCTypes RecentChange::parseToRCType
assertParseParams($expectedParseParams, $rawRcParams)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same user
Wikitext formatted, in the key only.
static newExtraneousContext(Title $title, $request=[])
Create a new extraneous context.
testParseParams()
RecentChange::parseParams.
static array static newFromRow($row)
static parseFromRCType($rcType)
Parsing RC_* constants to human-readable test.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
testParseFromRCType($rcType, $type)
provideRCTypes RecentChange::parseFromRCType
you have access to all of the normal MediaWiki so you can get a DB use the etc For full docs on the Maintenance class
testHiddenCategoryChange($isHidden)
provideCategoryContent RecentChange::newForCategorization
testNewFromRow()
RecentChange::newFromRow RecentChange::loadFromRow.
static overrideInstance(PageProps $store=null)
Overrides the default instance of this class This is intended for use while testing and will fail if ...
provideIsInRCLifespan()
50 mins and 100 mins are used here as the tests never take that long!
static parseToRCType($type)
Parsing text to RC_* constants.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached one of or reset my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled allows for interception of redirect as a string mapping parameter names to values & $type