diff options
author | Arlo Breault <abreault@wikimedia.org> | 2020-09-15 15:24:11 -0400 |
---|---|---|
committer | Arlo Breault <abreault@wikimedia.org> | 2020-12-11 11:47:00 -0500 |
commit | a6c769e976df47ead542690ac9d92c852715db26 (patch) | |
tree | a6e4dece8292be82b6e1a49c2c2bd57195f8226a /tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php | |
parent | 48f0aed7e2691a207ed7ddb8a94f5ffce6179f15 (diff) | |
download | mediawikicore-a6c769e976df47ead542690ac9d92c852715db26.tar.gz mediawikicore-a6c769e976df47ead542690ac9d92c852715db26.zip |
Share Parsoid's media styling with content
Since the legacy parser will also be emitting the new media structure
that requires these styles. For now, the feature is only shipped by
default when $wgUseNewMediaStructure is enabled.
Bug: T51097
Bug: T266148
Change-Id: Id20d716ce145e0bae37621fd6e218a793b5332ae
Diffstat (limited to 'tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php')
-rw-r--r-- | tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php index 5a9d7f9f5899..c394933ee01f 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php @@ -120,17 +120,21 @@ CSS public function testGetStyles( $parent, $logo, $expected ) { $module = $this->getMockBuilder( ResourceLoaderSkinModule::class ) ->setMethods( [ 'readStyleFiles', 'getConfig', 'getLogoData' ] ) + ->disableOriginalConstructor() ->getMock(); $module->expects( $this->once() )->method( 'readStyleFiles' ) ->willReturn( $parent ); - $module->expects( $this->once() )->method( 'getConfig' ) - ->willReturn( new HashConfig() ); + $module->expects( $this->any() )->method( 'getConfig' ) + ->willReturn( new HashConfig( [ + 'UseNewMediaStructure' => true, + ] ) ); $module->expects( $this->once() )->method( 'getLogoData' ) ->willReturn( $logo ); $ctx = $this->getMockBuilder( ResourceLoaderContext::class ) ->disableOriginalConstructor()->getMock(); + $module->__construct(); $this->assertEquals( $expected, $module->getStyles( $ctx ) |