mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
96fad3ea99
Use $this->getServiceContainer() instead of MediaWikiServices::getInstance() in tests. Change-Id: I5e56524b85ba6e34cecffba2f24fb44b3f66ec8f
31 lines
704 B
PHP
31 lines
704 B
PHP
<?php
|
|
|
|
namespace Cite\Tests;
|
|
|
|
use Cite\ResourceLoader\CiteCSSFileModule;
|
|
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',
|
|
$this->getServiceContainer()->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'] );
|
|
}
|
|
|
|
}
|