wiki.techinc.nl/tests/phpunit/includes/resourceloader
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
..
templates
DerivativeResourceLoaderContextTest.php
MessageBlobStoreTest.php resourceloader: Dependency inject WANObjectCache into MessageBlobStore 2020-02-12 22:16:42 +00:00
ResourceLoaderClientHtmlTest.php Fixes for PHPUnit 8 compatibility 2019-12-10 17:02:06 +00:00
ResourceLoaderContextTest.php tests: Replace PHPUnit's loose assertEquals(null) with assertNull() 2019-09-27 19:15:38 +00:00
ResourceLoaderFileModuleTest.php Support the creation of Skins with services injected 2020-03-16 23:25:42 +00:00
ResourceLoaderImageModuleTest.php resourceloader: Convert ImageModule test to stricter unit test 2019-09-24 23:17:31 +00:00
ResourceLoaderLessVarFileModuleTest.php
ResourceLoaderModuleTest.php Backwards-compatible PHPUnit 8 preparations 2019-11-02 12:40:07 -07:00
ResourceLoaderOOUIImageModuleTest.php Support the creation of Skins with services injected 2020-03-16 23:25:42 +00:00
ResourceLoaderSkinModuleTest.php ResourceLoaderSkinModule: Restore previous behavior in getLogoData() 2020-02-07 10:10:26 +08:00
ResourceLoaderStartUpModuleTest.php resourceloader: Move site-level mw.config from startup to mediawiki.base 2020-02-07 19:44:57 +00:00
ResourceLoaderTest.php Replace all new stdClass() with identical (object)[] 2020-03-04 21:18:30 +00:00
ResourceLoaderWikiModuleTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
VueComponentParserTest.php resourceloader: Support single-file component .vue files 2020-03-12 14:32:41 -07:00