TestsAutoLoader.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. global $wgAutoloadClasses;
  24. $testDir = __DIR__;
  25. $wgAutoloadClasses += [
  26. # tests
  27. 'DbTestPreviewer' => "$testDir/testHelpers.inc",
  28. 'DbTestRecorder' => "$testDir/testHelpers.inc",
  29. 'DelayedParserTest' => "$testDir/testHelpers.inc",
  30. 'ParserTestResult' => "$testDir/parser/ParserTestResult.php",
  31. 'TestFileIterator' => "$testDir/testHelpers.inc",
  32. 'TestFileDataProvider' => "$testDir/testHelpers.inc",
  33. 'TestRecorder' => "$testDir/testHelpers.inc",
  34. 'ITestRecorder' => "$testDir/testHelpers.inc",
  35. 'DjVuSupport' => "$testDir/testHelpers.inc",
  36. 'TidySupport' => "$testDir/testHelpers.inc",
  37. # tests/phpunit
  38. 'MediaWikiTestCase' => "$testDir/phpunit/MediaWikiTestCase.php",
  39. 'MediaWikiPHPUnitTestListener' => "$testDir/phpunit/MediaWikiPHPUnitTestListener.php",
  40. 'MediaWikiLangTestCase' => "$testDir/phpunit/MediaWikiLangTestCase.php",
  41. 'ResourceLoaderTestCase' => "$testDir/phpunit/ResourceLoaderTestCase.php",
  42. 'ResourceLoaderTestModule' => "$testDir/phpunit/ResourceLoaderTestCase.php",
  43. 'ResourceLoaderFileModuleTestModule' => "$testDir/phpunit/ResourceLoaderTestCase.php",
  44. 'TestUser' => "$testDir/phpunit/includes/TestUser.php",
  45. 'LessFileCompilationTest' => "$testDir/phpunit/LessFileCompilationTest.php",
  46. # tests/phpunit/includes
  47. 'RevisionStorageTest' => "$testDir/phpunit/includes/RevisionStorageTest.php",
  48. 'TestingAccessWrapper' => "$testDir/phpunit/includes/TestingAccessWrapper.php",
  49. 'TestLogger' => "$testDir/phpunit/includes/TestLogger.php",
  50. # tests/phpunit/includes/api
  51. 'ApiFormatTestBase' => "$testDir/phpunit/includes/api/format/ApiFormatTestBase.php",
  52. 'ApiQueryTestBase' => "$testDir/phpunit/includes/api/query/ApiQueryTestBase.php",
  53. 'ApiQueryContinueTestBase' => "$testDir/phpunit/includes/api/query/ApiQueryContinueTestBase.php",
  54. 'ApiTestCase' => "$testDir/phpunit/includes/api/ApiTestCase.php",
  55. 'ApiTestCaseUpload' => "$testDir/phpunit/includes/api/ApiTestCaseUpload.php",
  56. 'ApiTestContext' => "$testDir/phpunit/includes/api/ApiTestContext.php",
  57. 'MockApi' => "$testDir/phpunit/includes/api/MockApi.php",
  58. 'MockApiQueryBase' => "$testDir/phpunit/includes/api/MockApiQueryBase.php",
  59. 'UserWrapper' => "$testDir/phpunit/includes/api/UserWrapper.php",
  60. 'RandomImageGenerator' => "$testDir/phpunit/includes/api/RandomImageGenerator.php",
  61. # tests/phpunit/includes/auth
  62. 'MediaWiki\\Auth\\AuthenticationRequestTestCase' =>
  63. "$testDir/phpunit/includes/auth/AuthenticationRequestTestCase.php",
  64. # tests/phpunit/includes/changes
  65. 'TestRecentChangesHelper' => "$testDir/phpunit/includes/changes/TestRecentChangesHelper.php",
  66. # tests/phpunit/includes/content
  67. 'DummyContentHandlerForTesting' =>
  68. "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
  69. 'DummyContentForTesting' => "$testDir/phpunit/mocks/content/DummyContentForTesting.php",
  70. 'DummyNonTextContentHandler' => "$testDir/phpunit/mocks/content/DummyNonTextContentHandler.php",
  71. 'DummyNonTextContent' => "$testDir/phpunit/mocks/content/DummyNonTextContent.php",
  72. 'ContentHandlerTest' => "$testDir/phpunit/includes/content/ContentHandlerTest.php",
  73. 'JavaScriptContentTest' => "$testDir/phpunit/includes/content/JavaScriptContentTest.php",
  74. 'TextContentTest' => "$testDir/phpunit/includes/content/TextContentTest.php",
  75. 'WikitextContentTest' => "$testDir/phpunit/includes/content/WikitextContentTest.php",
  76. # tests/phpunit/includes/db
  77. 'DatabaseTestHelper' => "$testDir/phpunit/includes/db/DatabaseTestHelper.php",
  78. # tests/phpunit/includes/diff
  79. 'FakeDiffOp' => "$testDir/phpunit/includes/diff/FakeDiffOp.php",
  80. # tests/phpunit/includes/logging
  81. 'LogFormatterTestCase' => "$testDir/phpunit/includes/logging/LogFormatterTestCase.php",
  82. # tests/phpunit/includes/page
  83. 'WikiPageTest' => "$testDir/phpunit/includes/page/WikiPageTest.php",
  84. # tests/phpunit/includes/password
  85. 'PasswordTestCase' => "$testDir/phpunit/includes/password/PasswordTestCase.php",
  86. # tests/phpunit/includes/resourceloader
  87. 'ResourceLoaderImageModuleTest' =>
  88. "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
  89. 'ResourceLoaderImageModuleTestable' =>
  90. "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
  91. # tests/phpunit/includes/session
  92. 'MediaWiki\\Session\\TestBagOStuff' => "$testDir/phpunit/includes/session/TestBagOStuff.php",
  93. 'MediaWiki\\Session\\TestUtils' => "$testDir/phpunit/includes/session/TestUtils.php",
  94. # tests/phpunit/includes/specials
  95. 'SpecialPageTestBase' => "$testDir/phpunit/includes/specials/SpecialPageTestBase.php",
  96. 'SpecialPageExecutor' => "$testDir/phpunit/includes/specials/SpecialPageExecutor.php",
  97. # tests/phpunit/languages
  98. 'LanguageClassesTestCase' => "$testDir/phpunit/languages/LanguageClassesTestCase.php",
  99. # tests/phpunit/includes/libs
  100. 'GenericArrayObjectTest' => "$testDir/phpunit/includes/libs/GenericArrayObjectTest.php",
  101. # tests/phpunit/maintenance
  102. 'DumpTestCase' => "$testDir/phpunit/maintenance/DumpTestCase.php",
  103. # tests/phpunit/media
  104. 'FakeDimensionFile' => "$testDir/phpunit/includes/media/FakeDimensionFile.php",
  105. 'MediaWikiMediaTestCase' => "$testDir/phpunit/includes/media/MediaWikiMediaTestCase.php",
  106. # tests/phpunit/mocks
  107. 'MockFSFile' => "$testDir/phpunit/mocks/filebackend/MockFSFile.php",
  108. 'MockFileBackend' => "$testDir/phpunit/mocks/filebackend/MockFileBackend.php",
  109. 'MockBitmapHandler' => "$testDir/phpunit/mocks/media/MockBitmapHandler.php",
  110. 'MockImageHandler' => "$testDir/phpunit/mocks/media/MockImageHandler.php",
  111. 'MockSvgHandler' => "$testDir/phpunit/mocks/media/MockSvgHandler.php",
  112. 'MockDjVuHandler' => "$testDir/phpunit/mocks/media/MockDjVuHandler.php",
  113. 'MockOggHandler' => "$testDir/phpunit/mocks/media/MockOggHandler.php",
  114. 'MockWebRequest' => "$testDir/phpunit/mocks/MockWebRequest.php",
  115. 'MediaWiki\\Session\\DummySessionBackend'
  116. => "$testDir/phpunit/mocks/session/DummySessionBackend.php",
  117. 'DummySessionProvider' => "$testDir/phpunit/mocks/session/DummySessionProvider.php",
  118. # tests/parser
  119. 'NewParserTest' => "$testDir/phpunit/includes/parser/NewParserTest.php",
  120. 'MediaWikiParserTest' => "$testDir/phpunit/includes/parser/MediaWikiParserTest.php",
  121. 'ParserTest' => "$testDir/parser/parserTest.inc",
  122. 'ParserTestParserHook' => "$testDir/parser/parserTestsParserHook.php",
  123. # tests/phpunit/includes/site
  124. 'SiteTest' => "$testDir/phpunit/includes/site/SiteTest.php",
  125. 'TestSites' => "$testDir/phpunit/includes/site/TestSites.php",
  126. # tests/phpunit/includes/specialpage
  127. 'SpecialPageTestHelper' => "$testDir/phpunit/includes/specialpage/SpecialPageTestHelper.php",
  128. ];