Skip to content

Commit

Permalink
Fix SkinModule class
Browse files Browse the repository at this point in the history
  • Loading branch information
malberts committed Apr 29, 2024
1 parent 82f5d45 commit 634d802
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Hooks/ResourceLoaderRegisterModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
namespace Skins\Chameleon\Hooks;

use MediaWiki\ResourceLoader\ResourceLoader;
use MediaWiki\ResourceLoader\SkinModule;

/**
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderRegisterModules
Expand Down Expand Up @@ -59,7 +60,7 @@ private function registerBootstrap(): void {

private function registerChameleon(): void {
$this->resourceLoader->register( 'skins.chameleon', [
'class' => 'ResourceLoaderSkinModule',
'class' => SkinModule::class,
'features' => $this->getFeatures(),
'targets' => [
'desktop',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
namespace Skins\Chameleon\Tests\Unit\Hooks;

use MediaWiki\ResourceLoader\ResourceLoader;
use MediaWiki\ResourceLoader\SkinModule;
use PHPUnit\Framework\TestCase;
use Skins\Chameleon\Hooks\ResourceLoaderRegisterModules;

Expand Down Expand Up @@ -84,7 +85,7 @@ public function testProcess() {
->withConsecutive(
[ 'zzz.ext.bootstrap.styles', [ 'foo' => 'bar' ] ],
[ 'skins.chameleon', [
'class' => 'ResourceLoaderSkinModule',
'class' => SkinModule::class,
'features' => $this->getBaseFeatures(),
'targets' => [
'desktop',
Expand Down Expand Up @@ -119,7 +120,7 @@ public function testProcessWithExternalLinkIconsEnabled() {
->withConsecutive(
[ 'zzz.ext.bootstrap.styles', [ 'foo' => 'bar' ] ],
[ 'skins.chameleon', [
'class' => 'ResourceLoaderSkinModule',
'class' => SkinModule::class,
'features' => $features,
'targets' => [
'desktop',
Expand Down

0 comments on commit 634d802

Please sign in to comment.