mediawiki-extensions-Cite/tests/phpunit/CiteCSSFileModuleTest.php
Thiemo Kreuz 7157c7f494 Add @license to all files
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
2019-11-19 11:31:08 +01:00

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'] );
}
}