MediaWiki  1.30.0
QUnitTestResources.php
Go to the documentation of this file.
1 <?php
2 
3 /* Modules registered when $wgEnableJavaScriptTest is true */
4 
5 return [
6 
7  /* Utilities */
8 
9  'test.sinonjs' => [
10  'scripts' => [
11  'tests/qunit/suites/resources/test.sinonjs/index.js',
12  'resources/lib/sinonjs/sinon-1.17.3.js',
13  // We want tests to work in IE, but can't include this as it
14  // will break the placeholders in Sinon because the hack it uses
15  // to hijack IE globals relies on running in the global scope
16  // and in ResourceLoader this won't be running in the global scope.
17  // Including it results (among other things) in sandboxed timers
18  // being broken due to Date inheritance being undefined.
19  // 'resources/lib/sinonjs/sinon-ie-1.15.4.js',
20  ],
21  'targets' => [ 'desktop', 'mobile' ],
22  ],
23 
24  'test.mediawiki.qunit.testrunner' => [
25  'scripts' => [
26  'tests/qunit/data/testrunner.js',
27  ],
28  'dependencies' => [
29  // Test runner configures QUnit but can't have it as dependency,
30  // see SpecialJavaScriptTest::viewQUnit.
31  'jquery.getAttrs',
32  'mediawiki.page.ready',
33  'mediawiki.page.startup',
34  'test.sinonjs',
35  ],
36  'position' => 'top',
37  'targets' => [ 'desktop', 'mobile' ],
38  ],
39 
40  /*
41  Test suites for MediaWiki core modules
42  These must have a dependency on test.mediawiki.qunit.testrunner!
43  */
44 
45  'test.mediawiki.qunit.suites' => [
46  'scripts' => [
47  'tests/qunit/suites/resources/startup.test.js',
48  'tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js',
49  'tests/qunit/suites/resources/jquery/jquery.autoEllipsis.test.js',
50  'tests/qunit/suites/resources/jquery/jquery.byteLength.test.js',
51  'tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js',
52  'tests/qunit/suites/resources/jquery/jquery.color.test.js',
53  'tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js',
54  'tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js',
55  'tests/qunit/suites/resources/jquery/jquery.hidpi.test.js',
56  'tests/qunit/suites/resources/jquery/jquery.highlightText.test.js',
57  'tests/qunit/suites/resources/jquery/jquery.localize.test.js',
58  'tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js',
59  'tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js',
60  'tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js',
61  'tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js',
62  'tests/qunit/suites/resources/jquery/jquery.textSelection.test.js',
63  'tests/qunit/data/mediawiki.jqueryMsg.data.js',
64  'tests/qunit/suites/resources/mediawiki/mediawiki.requestIdleCallback.test.js',
65  'tests/qunit/suites/resources/mediawiki/mediawiki.errorLogger.test.js',
66  'tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js',
67  'tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js',
68  'tests/qunit/suites/resources/mediawiki/mediawiki.messagePoster.factory.test.js',
69  'tests/qunit/suites/resources/mediawiki/mediawiki.RegExp.test.js',
70  'tests/qunit/suites/resources/mediawiki/mediawiki.storage.test.js',
71  'tests/qunit/suites/resources/mediawiki/mediawiki.template.test.js',
72  'tests/qunit/suites/resources/mediawiki/mediawiki.template.mustache.test.js',
73  'tests/qunit/suites/resources/mediawiki/mediawiki.test.js',
74  'tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js',
75  'tests/qunit/suites/resources/mediawiki/mediawiki.html.test.js',
76  'tests/qunit/suites/resources/mediawiki/mediawiki.inspect.test.js',
77  'tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js',
78  'tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js',
79  'tests/qunit/suites/resources/mediawiki/mediawiki.track.test.js',
80  'tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js',
81  'tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js',
82  'tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js',
83  'tests/qunit/suites/resources/mediawiki/mediawiki.viewport.test.js',
84  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js',
85  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js',
86  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.edit.test.js',
87  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.messages.test.js',
88  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js',
89  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.parse.test.js',
90  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.upload.test.js',
91  'tests/qunit/suites/resources/mediawiki.api/mediawiki.api.watch.test.js',
92  'tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js',
93  'tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js',
94  'tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js',
95  'tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js',
96  'tests/qunit/suites/resources/mediawiki.rcfilters/UriProcessor.test.js',
97  'tests/qunit/suites/resources/mediawiki/mediawiki.language.test.js',
98  'tests/qunit/suites/resources/mediawiki/mediawiki.cldr.test.js',
99  'tests/qunit/suites/resources/mediawiki/mediawiki.cookie.test.js',
100  'tests/qunit/suites/resources/mediawiki/mediawiki.experiments.test.js',
101  ],
102  'dependencies' => [
103  'jquery.accessKeyLabel',
104  'jquery.autoEllipsis',
105  'jquery.byteLength',
106  'jquery.byteLimit',
107  'jquery.color',
108  'jquery.colorUtil',
109  'jquery.getAttrs',
110  'jquery.hidpi',
111  'jquery.highlightText',
112  'jquery.localize',
113  'jquery.makeCollapsible',
114  'jquery.tabIndex',
115  'jquery.tablesorter',
116  'jquery.textSelection',
117  'mediawiki.api',
118  'mediawiki.api.category',
119  'mediawiki.api.messages',
120  'mediawiki.api.options',
121  'mediawiki.api.parse',
122  'mediawiki.api.upload',
123  'mediawiki.api.watch',
124  'mediawiki.ForeignApi.core',
125  'mediawiki.jqueryMsg',
126  'mediawiki.messagePoster',
127  'mediawiki.RegExp',
128  'mediawiki.storage',
129  'mediawiki.Title',
130  'mediawiki.toc',
131  'mediawiki.Uri',
132  'mediawiki.user',
133  'mediawiki.template.mustache',
134  'mediawiki.template',
135  'mediawiki.util',
136  'mediawiki.viewport',
137  'mediawiki.special.recentchanges',
138  'mediawiki.rcfilters.filters.dm',
139  'mediawiki.language',
140  'mediawiki.cldr',
141  'mediawiki.cookie',
142  'mediawiki.experiments',
143  'mediawiki.inspect',
144  'test.mediawiki.qunit.testrunner',
145  ],
146  ]
147 ];
php
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
Definition: injection.txt:35