mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 15:04:02 +00:00
ab3063fee5
This patch does intentionally not touch any file name. Some of the file names are a little weird now, e.g. \Cite\Cite. These can more easily be renamed in later patches. I used https://codesearch.wmflabs.org/search/?q=new%20Cite%5C( and it looks like this code is not used anywhere else. Change-Id: I5f93a224e9cacf45b7a0d68c216a78723364dd96
32 lines
745 B
PHP
32 lines
745 B
PHP
<?php
|
|
|
|
namespace Cite\Tests;
|
|
|
|
use Cite\ResourceLoader\CiteCSSFileModule;
|
|
use MediaWiki\MediaWikiServices;
|
|
use ResourceLoaderContext;
|
|
|
|
/**
|
|
* @covers \Cite\ResourceLoader\CiteCSSFileModule
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
*/
|
|
class CiteCSSFileModuleTest extends \MediaWikiIntegrationTestCase {
|
|
|
|
protected function setUp() : void {
|
|
parent::setUp();
|
|
|
|
$this->setService(
|
|
'ContentLanguage',
|
|
MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( 'fa' )
|
|
);
|
|
}
|
|
|
|
public function testModule() {
|
|
$module = new CiteCSSFileModule( [], __DIR__ . '/../../modules' );
|
|
$styles = $module->getStyleFiles( $this->createMock( ResourceLoaderContext::class ) );
|
|
$this->assertSame( [ 'ext.cite.style.fa.css' ], $styles['all'] );
|
|
}
|
|
|
|
}
|