phpunit: Support setting skin context in BundleSizeTest subclasses
BundleSizeTest is mainly used by skins to test the size of the modules of the skin. Using default skin may cause unexpected results. Bug: T305779 Change-Id: Id77c6124c9b1fd20633cda47bbca89f9b6724a63
This commit is contained in:
parent
a01dbf1e07
commit
7798f184e8
1 changed files with 8 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ abstract class BundleSizeTest extends MediaWikiIntegrationTestCase {
|
|||
[
|
||||
'lang' => 'en',
|
||||
'modules' => $moduleName,
|
||||
'skin' => MediaWikiServices::getInstance()->getMainConfig()->get( 'DefaultSkin' )
|
||||
'skin' => $this->getSkinName(),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
@ -65,4 +65,11 @@ abstract class BundleSizeTest extends MediaWikiIntegrationTestCase {
|
|||
*/
|
||||
abstract public function getBundleSizeConfig(): string;
|
||||
|
||||
/**
|
||||
* @return string Skin name
|
||||
*/
|
||||
public function getSkinName(): string {
|
||||
return MediaWikiServices::getInstance()->getMainConfig()->get( 'DefaultSkin' );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue