2019-11-12 15:08:44 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Cite\Tests;
|
|
|
|
|
2019-11-19 14:12:11 +00:00
|
|
|
use Cite\ResourceLoader\CiteCSSFileModule;
|
2019-11-12 15:08:44 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
use ResourceLoaderContext;
|
|
|
|
|
|
|
|
/**
|
2019-11-19 14:12:11 +00:00
|
|
|
* @covers \Cite\ResourceLoader\CiteCSSFileModule
|
2019-11-19 10:31:08 +00:00
|
|
|
*
|
|
|
|
* @license GPL-2.0-or-later
|
2019-11-12 15:08:44 +00:00
|
|
|
*/
|
|
|
|
class CiteCSSFileModuleTest extends \MediaWikiIntegrationTestCase {
|
|
|
|
|
2021-07-22 05:44:15 +00:00
|
|
|
protected function setUp(): void {
|
2019-11-12 15:08:44 +00:00
|
|
|
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'] );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|