| 1 |
<?php |
| 2 |
|
| 3 |
namespace Cite\Tests; |
| 4 |
|
| 5 |
use Cite\ResourceLoader\CiteCSSFileModule; |
| 6 |
use MediaWiki\ResourceLoader\Context; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
class CiteCSSFileModuleTest extends \MediaWikiIntegrationTestCase { |
| 13 |
|
| 14 |
protected function setUp(): void { |
| 15 |
parent::setUp(); |
| 16 |
|
| 17 |
$this->setService( |
| 18 |
'ContentLanguage', |
| 19 |
$this->getServiceContainer()->getLanguageFactory()->getLanguage( 'wa' ) |
| 20 |
); |
| 21 |
} |
| 22 |
|
| 23 |
public function testModule() { |
| 24 |
$module = new CiteCSSFileModule( [], __DIR__ . '/../../modules/parsoid-styles' ); |
| 25 |
$styles = $module->getStyleFiles( $this->createMock( Context::class ) ); |
| 26 |
$this->assertSame( [ 'ext.cite.style.fr.less' ], $styles['all'] ); |
| 27 |
} |
| 28 |
|
| 29 |
} |