MediaWiki  1.27.2
TestsAutoLoader.php
Go to the documentation of this file.
1 <?php
25 $testDir = __DIR__;
26 
28 
29  # tests
30  'DbTestPreviewer' => "$testDir/testHelpers.inc",
31  'DbTestRecorder' => "$testDir/testHelpers.inc",
32  'DelayedParserTest' => "$testDir/testHelpers.inc",
33  'ParserTestResult' => "$testDir/parser/ParserTestResult.php",
34  'TestFileIterator' => "$testDir/testHelpers.inc",
35  'TestFileDataProvider' => "$testDir/testHelpers.inc",
36  'TestRecorder' => "$testDir/testHelpers.inc",
37  'ITestRecorder' => "$testDir/testHelpers.inc",
38  'DjVuSupport' => "$testDir/testHelpers.inc",
39  'TidySupport' => "$testDir/testHelpers.inc",
40 
41  # tests/phpunit
42  'MediaWikiTestCase' => "$testDir/phpunit/MediaWikiTestCase.php",
43  'MediaWikiPHPUnitTestListener' => "$testDir/phpunit/MediaWikiPHPUnitTestListener.php",
44  'MediaWikiLangTestCase' => "$testDir/phpunit/MediaWikiLangTestCase.php",
45  'ResourceLoaderTestCase' => "$testDir/phpunit/ResourceLoaderTestCase.php",
46  'ResourceLoaderTestModule' => "$testDir/phpunit/ResourceLoaderTestCase.php",
47  'ResourceLoaderFileModuleTestModule' => "$testDir/phpunit/ResourceLoaderTestCase.php",
48  'TestUser' => "$testDir/phpunit/includes/TestUser.php",
49  'LessFileCompilationTest' => "$testDir/phpunit/LessFileCompilationTest.php",
50 
51  # tests/phpunit/includes
52  'RevisionStorageTest' => "$testDir/phpunit/includes/RevisionStorageTest.php",
53  'TestingAccessWrapper' => "$testDir/phpunit/includes/TestingAccessWrapper.php",
54  'TestLogger' => "$testDir/phpunit/includes/TestLogger.php",
55 
56  # tests/phpunit/includes/api
57  'ApiFormatTestBase' => "$testDir/phpunit/includes/api/format/ApiFormatTestBase.php",
58  'ApiQueryTestBase' => "$testDir/phpunit/includes/api/query/ApiQueryTestBase.php",
59  'ApiQueryContinueTestBase' => "$testDir/phpunit/includes/api/query/ApiQueryContinueTestBase.php",
60  'ApiTestCase' => "$testDir/phpunit/includes/api/ApiTestCase.php",
61  'ApiTestCaseUpload' => "$testDir/phpunit/includes/api/ApiTestCaseUpload.php",
62  'ApiTestContext' => "$testDir/phpunit/includes/api/ApiTestContext.php",
63  'MockApi' => "$testDir/phpunit/includes/api/MockApi.php",
64  'MockApiQueryBase' => "$testDir/phpunit/includes/api/MockApiQueryBase.php",
65  'UserWrapper' => "$testDir/phpunit/includes/api/UserWrapper.php",
66  'RandomImageGenerator' => "$testDir/phpunit/includes/api/RandomImageGenerator.php",
67 
68  # tests/phpunit/includes/auth
69  'MediaWiki\\Auth\\AuthenticationRequestTestCase' =>
70  "$testDir/phpunit/includes/auth/AuthenticationRequestTestCase.php",
71 
72  # tests/phpunit/includes/changes
73  'TestRecentChangesHelper' => "$testDir/phpunit/includes/changes/TestRecentChangesHelper.php",
74 
75  # tests/phpunit/includes/content
76  'DummyContentHandlerForTesting' =>
77  "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
78  'DummyContentForTesting' => "$testDir/phpunit/mocks/content/DummyContentForTesting.php",
79  'DummyNonTextContentHandler' => "$testDir/phpunit/mocks/content/DummyNonTextContentHandler.php",
80  'DummyNonTextContent' => "$testDir/phpunit/mocks/content/DummyNonTextContent.php",
81  'ContentHandlerTest' => "$testDir/phpunit/includes/content/ContentHandlerTest.php",
82  'JavaScriptContentTest' => "$testDir/phpunit/includes/content/JavaScriptContentTest.php",
83  'TextContentTest' => "$testDir/phpunit/includes/content/TextContentTest.php",
84  'WikitextContentTest' => "$testDir/phpunit/includes/content/WikitextContentTest.php",
85 
86  # tests/phpunit/includes/db
87  'DatabaseTestHelper' => "$testDir/phpunit/includes/db/DatabaseTestHelper.php",
88 
89  # tests/phpunit/includes/diff
90  'FakeDiffOp' => "$testDir/phpunit/includes/diff/FakeDiffOp.php",
91 
92  # tests/phpunit/includes/logging
93  'LogFormatterTestCase' => "$testDir/phpunit/includes/logging/LogFormatterTestCase.php",
94 
95  # tests/phpunit/includes/page
96  'WikiPageTest' => "$testDir/phpunit/includes/page/WikiPageTest.php",
97 
98  # tests/phpunit/includes/password
99  'PasswordTestCase' => "$testDir/phpunit/includes/password/PasswordTestCase.php",
100 
101  # tests/phpunit/includes/resourceloader
102  'ResourceLoaderImageModuleTest' =>
103  "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
104  'ResourceLoaderImageModuleTestable' =>
105  "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
106 
107  # tests/phpunit/includes/session
108  'MediaWiki\\Session\\TestBagOStuff' => "$testDir/phpunit/includes/session/TestBagOStuff.php",
109  'MediaWiki\\Session\\TestUtils' => "$testDir/phpunit/includes/session/TestUtils.php",
110 
111  # tests/phpunit/includes/specials
112  'SpecialPageTestBase' => "$testDir/phpunit/includes/specials/SpecialPageTestBase.php",
113  'SpecialPageExecutor' => "$testDir/phpunit/includes/specials/SpecialPageExecutor.php",
114 
115  # tests/phpunit/languages
116  'LanguageClassesTestCase' => "$testDir/phpunit/languages/LanguageClassesTestCase.php",
117 
118  # tests/phpunit/includes/libs
119  'GenericArrayObjectTest' => "$testDir/phpunit/includes/libs/GenericArrayObjectTest.php",
120 
121  # tests/phpunit/maintenance
122  'DumpTestCase' => "$testDir/phpunit/maintenance/DumpTestCase.php",
123 
124  # tests/phpunit/media
125  'FakeDimensionFile' => "$testDir/phpunit/includes/media/FakeDimensionFile.php",
126  'MediaWikiMediaTestCase' => "$testDir/phpunit/includes/media/MediaWikiMediaTestCase.php",
127 
128  # tests/phpunit/mocks
129  'MockFSFile' => "$testDir/phpunit/mocks/filebackend/MockFSFile.php",
130  'MockFileBackend' => "$testDir/phpunit/mocks/filebackend/MockFileBackend.php",
131  'MockBitmapHandler' => "$testDir/phpunit/mocks/media/MockBitmapHandler.php",
132  'MockImageHandler' => "$testDir/phpunit/mocks/media/MockImageHandler.php",
133  'MockSvgHandler' => "$testDir/phpunit/mocks/media/MockSvgHandler.php",
134  'MockDjVuHandler' => "$testDir/phpunit/mocks/media/MockDjVuHandler.php",
135  'MockOggHandler' => "$testDir/phpunit/mocks/media/MockOggHandler.php",
136  'MockWebRequest' => "$testDir/phpunit/mocks/MockWebRequest.php",
137  'MediaWiki\\Session\\DummySessionBackend'
138  => "$testDir/phpunit/mocks/session/DummySessionBackend.php",
139  'DummySessionProvider' => "$testDir/phpunit/mocks/session/DummySessionProvider.php",
140 
141  # tests/parser
142  'NewParserTest' => "$testDir/phpunit/includes/parser/NewParserTest.php",
143  'MediaWikiParserTest' => "$testDir/phpunit/includes/parser/MediaWikiParserTest.php",
144  'ParserTest' => "$testDir/parser/parserTest.inc",
145  'ParserTestParserHook' => "$testDir/parser/parserTestsParserHook.php",
146 
147  # tests/phpunit/includes/site
148  'SiteTest' => "$testDir/phpunit/includes/site/SiteTest.php",
149  'TestSites' => "$testDir/phpunit/includes/site/TestSites.php",
150 
151  # tests/phpunit/includes/specialpage
152  'SpecialPageTestHelper' => "$testDir/phpunit/includes/specialpage/SpecialPageTestHelper.php",
153 ];
when a variable name is used in a it is silently declared as a new local masking the global
Definition: design.txt:93
$testDir
global $wgAutoloadClasses
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