mediawiki-extensions-Cite/tests/phpunit/CiteCSSFileModuleTest.php
Tim Starling bb72bc65f5 Use new ResourceLoader namespace
Extensions using Phan need to be updated simultaneously with core due
to T308443.

Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: Iebc5768a3125ce2b173e9b55fc3ea20616553824
2022-05-24 23:00:08 +00:00

32 lines
741 B
PHP

<?php
namespace Cite\Tests;
use Cite\ResourceLoader\CiteCSSFileModule;
use MediaWiki\MediaWikiServices;
use MediaWiki\ResourceLoader\Context;
/**
* @covers \Cite\ResourceLoader\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( Context::class ) );
$this->assertSame( [ 'ext.cite.style.fa.css' ], $styles['all'] );
}
}