Refactor MaintenanceTest to use a base test case
[lhc/web/wiklou.git] / tests / common / TestsAutoLoader.php
1 <?php
2 /**
3 * AutoLoader for the testing suite.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
19 *
20 * @file
21 * @ingroup Testing
22 */
23
24 global $wgAutoloadClasses;
25 $testDir = __DIR__ . "/..";
26
27 // phpcs:disable Generic.Files.LineLength
28 $wgAutoloadClasses += [
29
30 # tests/common
31 'TestSetup' => "$testDir/common/TestSetup.php",
32
33 # tests/integration
34 'MWHttpRequestTestCase' => "$testDir/integration/includes/http/MWHttpRequestTestCase.php",
35
36 # tests/parser
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",
52
53 # tests/phpunit
54 'MediaWikiTestCase' => "$testDir/phpunit/MediaWikiTestCase.php",
55 'MediaWikiPHPUnitTestListener' => "$testDir/phpunit/MediaWikiPHPUnitTestListener.php",
56 'MediaWikiLangTestCase' => "$testDir/phpunit/MediaWikiLangTestCase.php",
57 'ResourceLoaderTestCase' => "$testDir/phpunit/ResourceLoaderTestCase.php",
58 'ResourceLoaderTestModule' => "$testDir/phpunit/ResourceLoaderTestCase.php",
59 'ResourceLoaderFileTestModule' => "$testDir/phpunit/ResourceLoaderTestCase.php",
60 'ResourceLoaderFileModuleTestModule' => "$testDir/phpunit/ResourceLoaderTestCase.php",
61 'EmptyResourceLoader' => "$testDir/phpunit/ResourceLoaderTestCase.php",
62 'TestUser' => "$testDir/phpunit/includes/TestUser.php",
63 'TestUserRegistry' => "$testDir/phpunit/includes/TestUserRegistry.php",
64 'LessFileCompilationTest' => "$testDir/phpunit/LessFileCompilationTest.php",
65 'MediaWikiCoversValidator' => "$testDir/phpunit/MediaWikiCoversValidator.php",
66
67 # tests/phpunit/includes
68 'RevisionDbTestBase' => "$testDir/phpunit/includes/RevisionDbTestBase.php",
69 'RevisionTestModifyableContent' => "$testDir/phpunit/includes/RevisionTestModifyableContent.php",
70 'RevisionTestModifyableContentHandler' => "$testDir/phpunit/includes/RevisionTestModifyableContentHandler.php",
71 'TestLogger' => "$testDir/phpunit/includes/TestLogger.php",
72
73 # tests/phpunit/includes/api
74 'ApiFormatTestBase' => "$testDir/phpunit/includes/api/format/ApiFormatTestBase.php",
75 'ApiQueryTestBase' => "$testDir/phpunit/includes/api/query/ApiQueryTestBase.php",
76 'ApiQueryContinueTestBase' => "$testDir/phpunit/includes/api/query/ApiQueryContinueTestBase.php",
77 'ApiTestCase' => "$testDir/phpunit/includes/api/ApiTestCase.php",
78 'ApiTestCaseUpload' => "$testDir/phpunit/includes/api/ApiTestCaseUpload.php",
79 'ApiTestContext' => "$testDir/phpunit/includes/api/ApiTestContext.php",
80 'MockApi' => "$testDir/phpunit/includes/api/MockApi.php",
81 'MockApiQueryBase' => "$testDir/phpunit/includes/api/MockApiQueryBase.php",
82 'UserWrapper' => "$testDir/phpunit/includes/api/UserWrapper.php",
83 'RandomImageGenerator' => "$testDir/phpunit/includes/api/RandomImageGenerator.php",
84
85 # tests/phpunit/includes/auth
86 'MediaWiki\\Auth\\AuthenticationRequestTestCase' =>
87 "$testDir/phpunit/includes/auth/AuthenticationRequestTestCase.php",
88
89 # tests/phpunit/includes/changes
90 'TestRecentChangesHelper' => "$testDir/phpunit/includes/changes/TestRecentChangesHelper.php",
91
92 # tests/phpunit/includes/content
93 'DummyContentHandlerForTesting' =>
94 "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
95 'DummyContentForTesting' => "$testDir/phpunit/mocks/content/DummyContentForTesting.php",
96 'DummyNonTextContentHandler' => "$testDir/phpunit/mocks/content/DummyNonTextContentHandler.php",
97 'DummyNonTextContent' => "$testDir/phpunit/mocks/content/DummyNonTextContent.php",
98 'ContentHandlerTest' => "$testDir/phpunit/includes/content/ContentHandlerTest.php",
99 'JavaScriptContentTest' => "$testDir/phpunit/includes/content/JavaScriptContentTest.php",
100 'TextContentTest' => "$testDir/phpunit/includes/content/TextContentTest.php",
101 'WikitextContentTest' => "$testDir/phpunit/includes/content/WikitextContentTest.php",
102
103 # tests/phpunit/includes/db
104 'DatabaseTestHelper' => "$testDir/phpunit/includes/db/DatabaseTestHelper.php",
105
106 # tests/phpunit/includes/diff
107 'FakeDiffOp' => "$testDir/phpunit/includes/diff/FakeDiffOp.php",
108
109 # tests/phpunit/includes/externalstore
110 'ExternalStoreForTesting' => "$testDir/phpunit/includes/externalstore/ExternalStoreForTesting.php",
111
112 # tests/phpunit/includes/logging
113 'LogFormatterTestCase' => "$testDir/phpunit/includes/logging/LogFormatterTestCase.php",
114
115 # tests/phpunit/includes/page
116 'WikiPageDbTestBase' => "$testDir/phpunit/includes/page/WikiPageDbTestBase.php",
117
118 # tests/phpunit/includes/parser
119 'ParserIntegrationTest' => "$testDir/phpunit/includes/parser/ParserIntegrationTest.php",
120
121 # tests/phpunit/includes/password
122 'PasswordTestCase' => "$testDir/phpunit/includes/password/PasswordTestCase.php",
123
124 # tests/phpunit/includes/resourceloader
125 'ResourceLoaderImageModuleTest' =>
126 "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
127 'ResourceLoaderImageModuleTestable' =>
128 "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
129
130 # tests/phpunit/includes/session
131 'MediaWiki\\Session\\TestBagOStuff' => "$testDir/phpunit/includes/session/TestBagOStuff.php",
132 'MediaWiki\\Session\\TestUtils' => "$testDir/phpunit/includes/session/TestUtils.php",
133
134 # tests/phpunit/includes/site
135 'SiteTest' => "$testDir/phpunit/includes/site/SiteTest.php",
136 'TestSites' => "$testDir/phpunit/includes/site/TestSites.php",
137
138 # tests/phpunit/includes/specialpage
139 'SpecialPageTestHelper' => "$testDir/phpunit/includes/specialpage/SpecialPageTestHelper.php",
140 'AbstractChangesListSpecialPageTestCase' => "$testDir/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php",
141
142 # tests/phpunit/includes/specials
143 'SpecialPageTestBase' => "$testDir/phpunit/includes/specials/SpecialPageTestBase.php",
144 'SpecialPageExecutor' => "$testDir/phpunit/includes/specials/SpecialPageExecutor.php",
145
146 # tests/phpunit/languages
147 'LanguageClassesTestCase' => "$testDir/phpunit/languages/LanguageClassesTestCase.php",
148
149 # tests/phpunit/includes/libs
150 'GenericArrayObjectTest' => "$testDir/phpunit/includes/libs/GenericArrayObjectTest.php",
151
152 # tests/phpunit/maintenance
153 'MediaWiki\Tests\Maintenance\DumpTestCase' => "$testDir/phpunit/maintenance/DumpTestCase.php",
154 'MediaWiki\Tests\Maintenance\MaintenanceBaseTestCase' => "$testDir/phpunit/maintenance/MaintenanceBaseTestCase.php",
155
156 # tests/phpunit/media
157 'FakeDimensionFile' => "$testDir/phpunit/includes/media/FakeDimensionFile.php",
158 'MediaWikiMediaTestCase' => "$testDir/phpunit/includes/media/MediaWikiMediaTestCase.php",
159
160 # tests/phpunit/mocks
161 'MockFSFile' => "$testDir/phpunit/mocks/filebackend/MockFSFile.php",
162 'MockFileBackend' => "$testDir/phpunit/mocks/filebackend/MockFileBackend.php",
163 'MockLocalRepo' => "$testDir/phpunit/mocks/filerepo/MockLocalRepo.php",
164 'MockBitmapHandler' => "$testDir/phpunit/mocks/media/MockBitmapHandler.php",
165 'MockImageHandler' => "$testDir/phpunit/mocks/media/MockImageHandler.php",
166 'MockSvgHandler' => "$testDir/phpunit/mocks/media/MockSvgHandler.php",
167 'MockDjVuHandler' => "$testDir/phpunit/mocks/media/MockDjVuHandler.php",
168 'MockChangesListFilter' => "$testDir/phpunit/mocks/MockChangesListFilter.php",
169 'MockChangesListFilterGroup' => "$testDir/phpunit/mocks/MockChangesListFilterGroup.php",
170 'MockWebRequest' => "$testDir/phpunit/mocks/MockWebRequest.php",
171 'MediaWiki\\Session\\DummySessionBackend'
172 => "$testDir/phpunit/mocks/session/DummySessionBackend.php",
173 'DummySessionProvider' => "$testDir/phpunit/mocks/session/DummySessionProvider.php",
174
175 # tests/suites
176 'ParserTestFileSuite' => "$testDir/phpunit/suites/ParserTestFileSuite.php",
177 'ParserTestTopLevelSuite' => "$testDir/phpunit/suites/ParserTestTopLevelSuite.php",
178 ];
179 // phpcs:enable