4 * @group ResourceLoader
6 class ResourceLoaderOOUIImageModuleTest
extends ResourceLoaderTestCase
{
9 * @covers ResourceLoaderOOUIImageModule::loadFromDefinition
11 public function testNonDefaultSkin() {
12 $module = new ResourceLoaderOOUIImageModule( [
13 'class' => ResourceLoaderOOUIImageModule
::class,
15 'rootPath' => 'tests/phpunit/data/resourceloader/oouiimagemodule',
18 // Pretend that 'fakemonobook' is a real skin using the Apex theme
19 $skinFactory = new SkinFactory();
20 $skinFactory->register(
26 $this->setService( 'SkinFactory', $skinFactory );
28 $reset = ExtensionRegistry
::getInstance()->setAttributeForTest(
29 'SkinOOUIThemes', [ 'fakemonobook' => 'Apex' ]
32 $styles = $module->getStyles( $this->getResourceLoaderContext( [ 'skin' => 'fakemonobook' ] ) );
36 'Generated styles use the non-default image (embed)'
41 'Generated styles use the non-default image (link)'
44 $styles = $module->getStyles( $this->getResourceLoaderContext() );
48 'Generated styles use the default image (embed)'
53 'Generated styles use the default skin (link)'