wiki.techinc.nl/tests/phpunit/includes/installer/WebInstallerOutputTest.php
jdlrobson e5f09fd1bb Installer: Do not use mediawiki.skinning.interface module
The `mediawiki.skinning.interface` module includes the `toc` feature
which is enabled by default,
which requires a working localization environment which requires
DBLoadBalancer which is disabled at this entry point.

Instead use ResourceLoaderSkinModule directly with an opt-in
policy where toc feature is not disbled.

This means the definition in Resources.php is no longer
necessary so it is marked for deprecation. The installer
now works.

A unit test is added to make sure the installer stylesheet
doesn't break again.

Bug: T270027
Change-Id: I851fcd0e50e3a70158d5bfa1fdcae3cd278694d6
2021-04-15 11:11:32 -07:00

20 lines
504 B
PHP

<?php
class WebInstallerOutputTest extends MediaWikiIntegrationTestCase {
/**
* @covers WebInstallerOutput::getCSS
*/
public function testGetCSS() {
$_SERVER['DOCUMENT_ROOT'] = __DIR__ . '../../../';
$installer = $this->getMockBuilder( WebInstaller::class )
->disableOriginalConstructor()
->getMock();
$out = new WebInstallerOutput( $installer );
$css = $out->getCSS();
$this->assertStringContainsString(
'#content {',
$css,
'CSS for installer can be generated'
);
}
}