49 $this->
editPage(
'AQBT-All',
'[[Category:AQBT-Cat]] [[AQBT-Links]] {{AQBT-T}}' );
50 $this->
editPage(
'AQBT-Categories',
'[[Category:AQBT-Cat]]' );
51 $this->
editPage(
'AQBT-Links',
'[[AQBT-All]] [[AQBT-Categories]] [[AQBT-Templates]]' );
52 $this->
editPage(
'AQBT-Templates',
'{{AQBT-T}}' );
56 $this->
editPage(
'AQBT-All',
'[[Category:AQBT-Cat]] [[AQBT-Links]] {{AQBT-T}}' );
57 $this->
editPage(
'AQBT-Templates',
'{{AQBT-T}}' );
59 $this->exceptionFromAddDBData =
$e;
64 [
'prop' =>
'links',
'titles' =>
'AQBT-All' ],
69 'title' =>
'AQBT-All',
71 [
'ns' => 0,
'title' =>
'AQBT-Links' ],
78 [
'prop' =>
'templates',
'titles' =>
'AQBT-All' ],
83 'title' =>
'AQBT-All',
85 [
'ns' => 10,
'title' =>
'Template:AQBT-T' ],
92 [
'prop' =>
'categories',
'titles' =>
'AQBT-All' ],
97 'title' =>
'AQBT-All',
99 [
'ns' => 14,
'title' =>
'Category:AQBT-Cat' ],
106 [
'list' =>
'allpages',
'apprefix' =>
'AQBT-' ],
108 [
'pageid' => 1,
'ns' => 0,
'title' =>
'AQBT-All' ],
109 [
'pageid' => 2,
'ns' => 0,
'title' =>
'AQBT-Categories' ],
110 [
'pageid' => 3,
'ns' => 0,
'title' =>
'AQBT-Links' ],
111 [
'pageid' => 4,
'ns' => 0,
'title' =>
'AQBT-Templates' ],
116 [
'list' =>
'alllinks',
'alprefix' =>
'AQBT-' ],
118 [
'ns' => 0,
'title' =>
'AQBT-All' ],
119 [
'ns' => 0,
'title' =>
'AQBT-Categories' ],
120 [
'ns' => 0,
'title' =>
'AQBT-Links' ],
121 [
'ns' => 0,
'title' =>
'AQBT-Templates' ],
126 [
'list' =>
'alltransclusions',
'atprefix' =>
'AQBT-' ],
127 [
'alltransclusions' => [
128 [
'ns' => 10,
'title' =>
'Template:AQBT-T' ],
129 [
'ns' => 10,
'title' =>
'Template:AQBT-T' ],
135 [
'list' =>
'allcategories',
'acprefix' =>
'AQBT-' ],
136 [
'allcategories' => [
137 [
'*' =>
'AQBT-Cat' ],
142 [
'list' =>
'backlinks',
'bltitle' =>
'AQBT-Links' ],
144 [
'pageid' => 1,
'ns' => 0,
'title' =>
'AQBT-All' ],
149 [
'list' =>
'embeddedin',
'eititle' =>
'Template:AQBT-T' ],
151 [
'pageid' => 1,
'ns' => 0,
'title' =>
'AQBT-All' ],
152 [
'pageid' => 4,
'ns' => 0,
'title' =>
'AQBT-Templates' ],
157 [
'list' =>
'categorymembers',
'cmtitle' =>
'Category:AQBT-Cat' ],
158 [
'categorymembers' => [
159 [
'pageid' => 1,
'ns' => 0,
'title' =>
'AQBT-All' ],
160 [
'pageid' => 2,
'ns' => 0,
'title' =>
'AQBT-Categories' ],
165 [
'generator' =>
'allpages',
'gapprefix' =>
'AQBT-' ],
170 'title' =>
'AQBT-All' ],
174 'title' =>
'AQBT-Categories' ],
178 'title' =>
'AQBT-Links' ],
182 'title' =>
'AQBT-Templates' ],
187 [
'generator' =>
'links',
'titles' =>
'AQBT-Links' ],
192 'title' =>
'AQBT-All' ],
196 'title' =>
'AQBT-Categories' ],
200 'title' =>
'AQBT-Templates' ],
205 [
'prop' =>
'links' ],
207 '1' => [
'links' => [
208 [
'ns' => 0,
'title' =>
'AQBT-Links' ],
214 [
'prop' =>
'templates' ],
216 '1' => [
'templates' => [
217 [
'ns' => 10,
'title' =>
'Template:AQBT-T' ] ] ],
218 '4' => [
'templates' => [
219 [
'ns' => 10,
'title' =>
'Template:AQBT-T' ] ] ],
227 $this->
check( self::$links );
228 $this->
check( self::$templates );
229 $this->
check( self::$categories );
236 $this->
check( self::$allpages );
237 $this->
check( self::$alllinks );
238 $this->
check( self::$alltransclusions );
242 $this->
check( self::$backlinks );
243 $this->
check( self::$embeddedin );
244 $this->
check( self::$categorymembers );
263 self::$alltransclusions,
268 self::$categorymembers
278 self::$alltransclusions,
283 self::$categorymembers
292 $this->
check( self::$generatorAllpages );
295 self::$generatorAllpages,
298 $this->
check( self::$generatorLinks );
301 self::$generatorLinks,
302 self::$generatorLinksPropLinks ) );
305 self::$generatorLinks,
306 self::$generatorLinksPropTemplates ) );
309 self::$generatorLinks,
310 self::$generatorLinksPropLinks,
311 self::$generatorLinksPropTemplates ) );
314 self::$generatorLinks,
315 self::$generatorLinksPropLinks,
316 self::$generatorLinksPropTemplates,
319 self::$alltransclusions,
324 self::$categorymembers ) );
331 $this->
editPage(
'AQBT-Target',
'test' );
332 $this->
editPage(
'AQBT-Redir',
'#REDIRECT [[AQBT-Target]]' );
334 [
'generator' =>
'backlinks',
'gbltitle' =>
'AQBT-Target',
'redirects' =>
'1' ],
338 'from' =>
'AQBT-Redir',
339 'to' =>
'AQBT-Target',
346 'title' =>
'AQBT-Target',
check($values, array $session=null, $appendModule=false, User $user=null)
Checks that the request's result matches the expected results.
testGeneratorRedirects()
Test bug 51821.
static static static $alltransclusions
testGenerator()
Test basic lists.
addDBDataOnce()
Create a set of pages.
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException'returning false will NOT prevent logging $e
static static $embeddedin
static static $generatorLinksPropTemplates
testAllTogether()
Test basic lists.
static newFromText($text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
These tests validate basic functionality of the api query module.
static static testProps()
Test basic props.
This class has some common functionality for testing query module.
static static static $categorymembers
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
testLists()
Test basic lists.
editPage($pageName, $text, $summary= '', $defaultNs=NS_MAIN)
Edits or creates a page/revision.
static static static static $allcategories
merge()
Merges all requests parameter + expected values into one.
static static static static $generatorAllpages
static $generatorLinksPropLinks