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