2019-11-12 15:08:44 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Cite\Tests;
|
|
|
|
|
2019-11-19 14:12:11 +00:00
|
|
|
use Cite\ResourceLoader\CiteCSSFileModule;
|
2022-05-20 02:11:31 +00:00
|
|
|
use MediaWiki\ResourceLoader\Context;
|
2019-11-12 15:08:44 +00:00
|
|
|
|
|
|
|
/**
|
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',
|
2023-10-26 19:55:00 +00:00
|
|
|
$this->getServiceContainer()->getLanguageFactory()->getLanguage( 'fa' )
|
2019-11-12 15:08:44 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testModule() {
|
2024-03-11 10:33:19 +00:00
|
|
|
$module = new CiteCSSFileModule( [], __DIR__ . '/../../modules/parsoid-styles' );
|
2022-05-20 02:11:31 +00:00
|
|
|
$styles = $module->getStyleFiles( $this->createMock( Context::class ) );
|
2019-11-12 15:08:44 +00:00
|
|
|
$this->assertSame( [ 'ext.cite.style.fa.css' ], $styles['all'] );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|