mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
7157c7f494
Note this codebase appears to be dual-licensed. Some files mention MIT, but extension.json and some other files mention GPL. Since WMDE typically uses GPL, I will continue to mark the files we created as such. Change-Id: I126da10f7fb13a6d4c99e96e72d024b2e5ecee06
32 lines
705 B
PHP
32 lines
705 B
PHP
<?php
|
|
|
|
namespace Cite\Tests;
|
|
|
|
use CiteCSSFileModule;
|
|
use MediaWiki\MediaWikiServices;
|
|
use ResourceLoaderContext;
|
|
|
|
/**
|
|
* @covers \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'] );
|
|
}
|
|
|
|
}
|