31 'TestSetup' =>
"$testDir/common/TestSetup.php",
34 'MWHttpRequestTestCase' =>
"$testDir/integration/includes/http/MWHttpRequestTestCase.php",
37 'DbTestPreviewer' =>
"$testDir/parser/DbTestPreviewer.php",
38 'DbTestRecorder' =>
"$testDir/parser/DbTestRecorder.php",
39 'DjVuSupport' =>
"$testDir/parser/DjVuSupport.php",
40 'MultiTestRecorder' =>
"$testDir/parser/MultiTestRecorder.php",
41 'ParserTestMockParser' =>
"$testDir/parser/ParserTestMockParser.php",
42 'ParserTestRunner' =>
"$testDir/parser/ParserTestRunner.php",
43 'ParserTestParserHook' =>
"$testDir/parser/ParserTestParserHook.php",
44 'ParserTestPrinter' =>
"$testDir/parser/ParserTestPrinter.php",
45 'ParserTestResult' =>
"$testDir/parser/ParserTestResult.php",
46 'ParserTestResultNormalizer' =>
"$testDir/parser/ParserTestResultNormalizer.php",
47 'PhpunitTestRecorder' =>
"$testDir/parser/PhpunitTestRecorder.php",
48 'TestFileEditor' =>
"$testDir/parser/TestFileEditor.php",
49 'TestFileReader' =>
"$testDir/parser/TestFileReader.php",
50 'TestRecorder' =>
"$testDir/parser/TestRecorder.php",
51 'TidySupport' =>
"$testDir/parser/TidySupport.php",
54 'EmptyResourceLoader' =>
"$testDir/phpunit/ResourceLoaderTestCase.php",
55 'HamcrestPHPUnitIntegration' =>
"$testDir/phpunit/HamcrestPHPUnitIntegration.php",
56 'LessFileCompilationTest' =>
"$testDir/phpunit/LessFileCompilationTest.php",
57 'MediaWikiCoversValidator' =>
"$testDir/phpunit/MediaWikiCoversValidator.php",
58 'MediaWikiLangTestCase' =>
"$testDir/phpunit/MediaWikiLangTestCase.php",
59 'MediaWikiPHPUnitCommand' =>
"$testDir/phpunit/MediaWikiPHPUnitCommand.php",
60 'MediaWikiPHPUnitTestListener' =>
"$testDir/phpunit/MediaWikiPHPUnitTestListener.php",
61 'MediaWikiTestCase' =>
"$testDir/phpunit/MediaWikiTestCase.php",
62 'MediaWikiTestResult' =>
"$testDir/phpunit/MediaWikiTestResult.php",
63 'MediaWikiTestRunner' =>
"$testDir/phpunit/MediaWikiTestRunner.php",
64 'PHPUnit4And6Compat' =>
"$testDir/phpunit/PHPUnit4And6Compat.php",
65 'ResourceLoaderFileModuleTestModule' =>
"$testDir/phpunit/ResourceLoaderTestCase.php",
66 'ResourceLoaderFileTestModule' =>
"$testDir/phpunit/ResourceLoaderTestCase.php",
67 'ResourceLoaderTestCase' =>
"$testDir/phpunit/ResourceLoaderTestCase.php",
68 'ResourceLoaderTestModule' =>
"$testDir/phpunit/ResourceLoaderTestCase.php",
69 'TestUser' =>
"$testDir/phpunit/includes/TestUser.php",
70 'TestUserRegistry' =>
"$testDir/phpunit/includes/TestUserRegistry.php",
72 # tests/phpunit/includes
73 'PageArchiveTestBase' =>
"$testDir/phpunit/includes/page/PageArchiveTestBase.php",
74 'RevisionDbTestBase' =>
"$testDir/phpunit/includes/RevisionDbTestBase.php",
75 'RevisionTestModifyableContent' =>
"$testDir/phpunit/includes/RevisionTestModifyableContent.php",
76 'RevisionTestModifyableContentHandler' =>
"$testDir/phpunit/includes/RevisionTestModifyableContentHandler.php",
77 'TestLogger' =>
"$testDir/phpunit/includes/TestLogger.php",
79 # tests/phpunit/includes/api
80 'ApiFormatTestBase' =>
"$testDir/phpunit/includes/api/format/ApiFormatTestBase.php",
81 'ApiQueryTestBase' =>
"$testDir/phpunit/includes/api/query/ApiQueryTestBase.php",
82 'ApiQueryContinueTestBase' =>
"$testDir/phpunit/includes/api/query/ApiQueryContinueTestBase.php",
83 'ApiTestCase' =>
"$testDir/phpunit/includes/api/ApiTestCase.php",
84 'ApiTestCaseUpload' =>
"$testDir/phpunit/includes/api/ApiTestCaseUpload.php",
85 'ApiTestContext' =>
"$testDir/phpunit/includes/api/ApiTestContext.php",
86 'ApiUploadTestCase' =>
"$testDir/phpunit/includes/api/ApiUploadTestCase.php",
87 'MockApi' =>
"$testDir/phpunit/includes/api/MockApi.php",
88 'MockApiQueryBase' =>
"$testDir/phpunit/includes/api/MockApiQueryBase.php",
89 'UserWrapper' =>
"$testDir/phpunit/includes/api/UserWrapper.php",
90 'RandomImageGenerator' =>
"$testDir/phpunit/includes/api/RandomImageGenerator.php",
92 # tests/phpunit/includes/auth
93 'MediaWiki\\Auth\\AuthenticationRequestTestCase' =>
94 "$testDir/phpunit/includes/auth/AuthenticationRequestTestCase.php",
96 # tests/phpunit/includes/changes
97 'TestRecentChangesHelper' =>
"$testDir/phpunit/includes/changes/TestRecentChangesHelper.php",
99 # tests/phpunit/includes/content
100 'DummyContentHandlerForTesting' =>
101 "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
102 'DummyContentForTesting' =>
"$testDir/phpunit/mocks/content/DummyContentForTesting.php",
103 'DummyNonTextContentHandler' =>
"$testDir/phpunit/mocks/content/DummyNonTextContentHandler.php",
104 'DummyNonTextContent' =>
"$testDir/phpunit/mocks/content/DummyNonTextContent.php",
105 'DummySerializeErrorContentHandler' =>
106 "$testDir/phpunit/mocks/content/DummySerializeErrorContentHandler.php",
107 'ContentHandlerTest' =>
"$testDir/phpunit/includes/content/ContentHandlerTest.php",
108 'JavaScriptContentTest' =>
"$testDir/phpunit/includes/content/JavaScriptContentTest.php",
109 'TextContentTest' =>
"$testDir/phpunit/includes/content/TextContentTest.php",
110 'WikitextContentTest' =>
"$testDir/phpunit/includes/content/WikitextContentTest.php",
112 # tests/phpunit/includes/db
113 'DatabaseTestHelper' =>
"$testDir/phpunit/includes/db/DatabaseTestHelper.php",
115 # tests/phpunit/includes/debug
116 'TestDeprecatedClass' =>
"$testDir/phpunit/includes/debug/TestDeprecatedClass.php",
117 'TestDeprecatedSubclass' =>
"$testDir/phpunit/includes/debug/TestDeprecatedSubclass.php",
119 # tests/phpunit/includes/diff
120 'CustomDifferenceEngine' =>
"$testDir/phpunit/includes/diff/CustomDifferenceEngine.php",
121 'FakeDiffOp' =>
"$testDir/phpunit/includes/diff/FakeDiffOp.php",
123 # tests/phpunit/includes/externalstore
124 'ExternalStoreForTesting' =>
"$testDir/phpunit/includes/externalstore/ExternalStoreForTesting.php",
126 # tests/phpunit/includes/logging
127 'LogFormatterTestCase' =>
"$testDir/phpunit/includes/logging/LogFormatterTestCase.php",
129 # tests/phpunit/includes/page
130 'WikiPageDbTestBase' =>
"$testDir/phpunit/includes/page/WikiPageDbTestBase.php",
132 # tests/phpunit/includes/parser
133 'ParserIntegrationTest' =>
"$testDir/phpunit/suites/ParserIntegrationTest.php",
135 # tests/phpunit/includes/password
136 'PasswordTestCase' =>
"$testDir/phpunit/includes/password/PasswordTestCase.php",
138 # tests/phpunit/includes/resourceloader
139 'ResourceLoaderImageModuleTest' =>
140 "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
141 'ResourceLoaderImageModuleTestable' =>
142 "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
144 # tests/phpunit/includes/session
145 'MediaWiki\\Session\\TestBagOStuff' =>
"$testDir/phpunit/includes/session/TestBagOStuff.php",
146 'MediaWiki\\Session\\TestUtils' =>
"$testDir/phpunit/includes/session/TestUtils.php",
148 # tests/phpunit/includes/site
149 'SiteTest' =>
"$testDir/phpunit/includes/site/SiteTest.php",
150 'TestSites' =>
"$testDir/phpunit/includes/site/TestSites.php",
152 # tests/phpunit/includes/specialpage
153 'SpecialPageTestHelper' =>
"$testDir/phpunit/includes/specialpage/SpecialPageTestHelper.php",
154 'AbstractChangesListSpecialPageTestCase' =>
"$testDir/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php",
156 # tests/phpunit/includes/specials
157 'SpecialPageTestBase' =>
"$testDir/phpunit/includes/specials/SpecialPageTestBase.php",
158 'SpecialPageExecutor' =>
"$testDir/phpunit/includes/specials/SpecialPageExecutor.php",
160 # tests/phpunit/includes/Revision
161 'MediaWiki\Tests\Revision\McrSchemaDetection' =>
"$testDir/phpunit/includes/Revision/McrSchemaDetection.php",
162 'MediaWiki\Tests\Revision\McrSchemaOverride' =>
"$testDir/phpunit/includes/Revision/McrSchemaOverride.php",
163 'MediaWiki\Tests\Revision\McrWriteBothSchemaOverride' =>
"$testDir/phpunit/includes/Revision/McrWriteBothSchemaOverride.php",
164 'MediaWiki\Tests\Revision\McrReadNewSchemaOverride' =>
"$testDir/phpunit/includes/Revision/McrReadNewSchemaOverride.php",
165 'MediaWiki\Tests\Revision\RevisionSlotsTest' =>
"$testDir/phpunit/includes/Revision/RevisionSlotsTest.php",
166 'MediaWiki\Tests\Revision\RevisionRecordTests' =>
"$testDir/phpunit/includes/Revision/RevisionRecordTests.php",
167 'MediaWiki\Tests\Revision\RevisionStoreDbTestBase' =>
"$testDir/phpunit/includes/Revision/RevisionStoreDbTestBase.php",
168 'MediaWiki\Tests\Revision\PreMcrSchemaOverride' =>
"$testDir/phpunit/includes/Revision/PreMcrSchemaOverride.php",
170 # tests/phpunit/languages
171 'LanguageClassesTestCase' =>
"$testDir/phpunit/languages/LanguageClassesTestCase.php",
173 # tests/phpunit/includes/libs
174 'GenericArrayObjectTest' =>
"$testDir/phpunit/includes/libs/GenericArrayObjectTest.php",
176 # tests/phpunit/maintenance
177 'MediaWiki\Tests\Maintenance\DumpTestCase' =>
"$testDir/phpunit/maintenance/DumpTestCase.php",
178 'MediaWiki\Tests\Maintenance\MaintenanceBaseTestCase' =>
"$testDir/phpunit/maintenance/MaintenanceBaseTestCase.php",
180 # tests/phpunit/media
181 'FakeDimensionFile' =>
"$testDir/phpunit/includes/media/FakeDimensionFile.php",
182 'MediaWikiMediaTestCase' =>
"$testDir/phpunit/includes/media/MediaWikiMediaTestCase.php",
184 # tests/phpunit/mocks
185 'MockFSFile' =>
"$testDir/phpunit/mocks/filebackend/MockFSFile.php",
186 'MockFileBackend' =>
"$testDir/phpunit/mocks/filebackend/MockFileBackend.php",
187 'MockLocalRepo' =>
"$testDir/phpunit/mocks/filerepo/MockLocalRepo.php",
188 'MockBitmapHandler' =>
"$testDir/phpunit/mocks/media/MockBitmapHandler.php",
189 'MockImageHandler' =>
"$testDir/phpunit/mocks/media/MockImageHandler.php",
190 'MockSvgHandler' =>
"$testDir/phpunit/mocks/media/MockSvgHandler.php",
191 'MockDjVuHandler' =>
"$testDir/phpunit/mocks/media/MockDjVuHandler.php",
192 'MockChangesListFilter' =>
"$testDir/phpunit/mocks/MockChangesListFilter.php",
193 'MockChangesListFilterGroup' =>
"$testDir/phpunit/mocks/MockChangesListFilterGroup.php",
194 'MockWebRequest' =>
"$testDir/phpunit/mocks/MockWebRequest.php",
195 'MediaWiki\\Session\\DummySessionBackend'
196 =>
"$testDir/phpunit/mocks/session/DummySessionBackend.php",
197 'DummySessionProvider' =>
"$testDir/phpunit/mocks/session/DummySessionProvider.php",
198 'MockMessageLocalizer' =>
"$testDir/phpunit/mocks/MockMessageLocalizer.php",
199 'MockCompletionSearchEngine' =>
"$testDir/phpunit/mocks/search/MockCompletionSearchEngine.php",
200 'MockSearchEngine' =>
"$testDir/phpunit/mocks/search/MockSearchEngine.php",
201 'MockSearchResultSet' =>
"$testDir/phpunit/mocks/search/MockSearchResultSet.php",
202 'MockSearchResult' =>
"$testDir/phpunit/mocks/search/MockSearchResult.php",
205 'ParserTestFileSuite' =>
"$testDir/phpunit/suites/ParserTestFileSuite.php",
206 'ParserTestTopLevelSuite' =>
"$testDir/phpunit/suites/ParserTestTopLevelSuite.php",
218spl_autoload_register(
function ( $class ) {
219 if ( strpos( $class,
'PHPUnit_' ) !== 0 ) {
226 'PHPUnit_Framework_TestSuite_DataProvider' =>
'PHPUnit\Framework\DataProviderTestSuite',
227 'PHPUnit_Framework_Error' =>
'PHPUnit\Framework\Error\Error',
230 if ( isset( $map[$class] ) ) {
231 $newForm = $map[$class];
233 $newForm = str_replace(
'_',
'\\', $class );
236 if ( class_exists( $newForm ) || interface_exists( $newForm ) ) {
239 class_alias( $newForm, $class );
global $wgAutoloadClasses