wiki.techinc.nl/tests/phpunit/includes/api
mainframe98 2619b261bb Support the creation of Skins with services injected
The old way of providing a callable to SkinFactory::register is
still supported. Those callables expected the skin name as their
first argument. Coincidentally, so does the constructor of Skin.
Some skins might not define any constructor parameters at all,
which is acceptable to PHP, as it will just discard the argument.

The registration using $wgValidSkinNames has not been changed,
and skins that want to define services to be injected will still
need to manually register their skin to the skin factory.

CodeSearch did not indicate any extensions or skins manually
constructing a SkinFactory in tests, but for posterity, the old
way of creating a SkinFactory for testing can be replaced with
  new SkinFactory( new ObjectFactory(
  	$this->createMock( ContainerInterface::class )
  ) );

Note that the constructor for SkinFactory for internal use only,
in accordance with the Stable interface policy.
You should use MediaWikiServices::getInstance()->getSkinFactory
instead.

Bug: T244466
Change-Id: I8ba9d869bddd9b6124e47697b789d752c0620b02
2020-03-16 23:25:42 +00:00
..
format Fix most PHPUnit 8 compat issues in DBless tests 2019-12-15 00:24:21 +00:00
query Merge "API: Fix fetching login token from action=query&meta=tokens on private wikis" 2020-03-13 09:59:52 +00:00
Validator Make use of PHPUnit's assertCount feature where possible 2020-03-02 15:58:41 +00:00
ApiBaseTest.php API: Use ParamValidator library 2020-02-04 13:36:14 -05:00
ApiBlockInfoTraitTest.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
ApiBlockTest.php Remove $wgEnablePartialBlocks config and always enable partial blocks 2020-03-04 13:45:44 +00:00
ApiChangeContentModelTest.php Add a ContentModelChange helper, and an api module that uses it 2020-02-27 19:02:29 +00:00
ApiCheckTokenTest.php Add tests for ApiCheckToken 2018-01-01 02:06:59 +02:00
ApiClearHasMsgTest.php Add message to the assert of ApiClearHasMsgTest 2018-01-03 04:29:23 +02:00
ApiComparePagesTest.php Add $wgDiffEngine 2019-11-05 10:38:52 -05:00
ApiContinuationManagerTest.php Revert "Separate MediaWiki unit and integration tests" 2019-06-13 23:00:08 +00:00
ApiCSPReportTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiDeleteTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiDisabledTest.php Replace setExpectedException with two args 2019-10-05 16:14:05 +00:00
ApiEditPageTest.php ApiEditPage: add baserevid parameter 2020-03-11 13:29:09 +01:00
ApiErrorFormatterTest.php Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
ApiLoginTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiLogoutTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiMainTest.php ApiMain: Add support for assert=anon 2020-02-19 22:37:31 +01:00
ApiMessageTest.php Revert "Separate MediaWiki unit and integration tests" 2019-06-13 23:00:08 +00:00
ApiModuleManagerTest.php phpcs: Enable MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedException* and make pass 2019-10-14 12:48:48 -07:00
ApiMoveTest.php Add target page as a parameter to articleexists message 2019-12-20 00:09:45 +00:00
ApiOpenSearchTest.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
ApiOptionsTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiPageSetTest.php tests: Prefer assertSame() when comparing the integer 0 2019-09-19 15:35:23 +00:00
ApiParseTest.php Support the creation of Skins with services injected 2020-03-16 23:25:42 +00:00
ApiPurgeTest.php Make use of PHPUnit's assertCount feature where possible 2020-03-02 15:58:41 +00:00
ApiQueryAllPagesTest.php tests: Fix broken assertion in ApiQueryAllPagesTest 2019-09-30 16:22:54 +02:00
ApiQueryBlockInfoTraitTest.php API: Use ApiBlockInfoTrait in ApiQueryUsers and AllUsers 2019-09-18 19:44:01 +00:00
ApiQueryBlocksTest.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
ApiQueryDisabledTest.php Add PHPUnit test to ApiQueryDisabled 2018-08-02 21:44:24 -04:00
ApiQueryInfoTest.php Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
ApiQueryLanguageinfoTest.php Make use of PHPUnit's assertCount feature where possible 2020-03-02 15:58:41 +00:00
ApiQueryPrefixSearchTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiQueryRecentChangesIntegrationTest.php watchlist: Misc cleanup for ApiQueryRecentChangesIntegrationTest 2020-03-08 18:24:22 +00:00
ApiQuerySearchTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiQuerySiteinfoTest.php Merge "languages: Move default $wgNamespaceAliases to MessagesEn.php" 2020-03-15 00:14:08 +00:00
ApiQueryWatchlistIntegrationTest.php Make use of PHPUnit's assertCount feature where possible 2020-03-02 15:58:41 +00:00
ApiQueryWatchlistRawIntegrationTest.php Make use of PHPUnit's assertCount feature where possible 2020-03-02 15:58:41 +00:00
ApiResultTest.php Replace all new stdClass() with identical (object)[] 2020-03-04 21:18:30 +00:00
ApiRevisionDeleteTest.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
ApiSetNotificationTimestampIntegrationTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiStashEditTest.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
ApiTestCase.php Hard deprecate ApiTestCase::doLogin 2020-02-15 02:31:33 +00:00
ApiTestContext.php
ApiTokensTest.php Remove usages of deprecated User::getRights. 2019-08-20 19:43:54 -07:00
ApiUnblockTest.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
ApiUploadTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ApiUploadTestCase.php Tests: Pass a user to FileDeleteForm::doDelete 2020-02-19 22:32:31 +00:00
ApiUsageExceptionTest.php Revert "Separate MediaWiki unit and integration tests" 2019-06-13 23:00:08 +00:00
ApiUserrightsTest.php Use nullable type in function signature 2019-11-20 19:20:38 +01:00
ApiWatchTest.php Make use of PHPUnit's assertCount feature where possible 2020-03-02 15:58:41 +00:00
generateRandomImages.php tests: Replace RandomImageGenerator dictionary logic with rand+time 2019-10-25 02:07:21 +01:00
MockApi.php API: i18n for warnings and errors 2016-12-06 10:20:48 -05:00
MockApiQueryBase.php Replace some oldskool @see with @inheritDoc 2019-11-08 18:00:27 +00:00
RandomImageGenerator.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
UserWrapper.php
words.txt