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