4 * @group ResourceLoader
6 class ResourceLoaderOOUIImageModuleTest
extends ResourceLoaderTestCase
{
9 * @covers ResourceLoaderOOUIImageModule::loadFromDefinition
11 public function testNonDefaultSkin() {
12 $module = new ResourceLoaderOOUIImageModule( [
13 'class' => 'ResourceLoaderOOUIImageModule',
15 'rootPath' => 'tests/phpunit/data/resourceloader/oouiimagemodule',
18 // Pretend that 'fakemonobook' is a real skin using the Apex theme
19 SkinFactory
::getDefaultInstance()->register(
25 $r = new ReflectionMethod( 'ExtensionRegistry', 'exportExtractedData' );
26 $r->setAccessible( true );
27 $r->invoke( ExtensionRegistry
::getInstance(), [
32 'autoloaderPaths' => [],
35 'fakemonobook' => 'Apex',
40 $styles = $module->getStyles( $this->getResourceLoaderContext( [ 'skin' => 'fakemonobook' ] ) );
44 'Generated styles use the non-default image (embed)'
49 'Generated styles use the non-default image (link)'
52 $styles = $module->getStyles( $this->getResourceLoaderContext() );
56 'Generated styles use the default image (embed)'
61 'Generated styles use the default image (link)'