mediawiki-extensions-Cite/tests/phpunit/CiteCSSFileModuleTest.php
Thiemo Kreuz ab3063fee5 Move all code to PSR-4 compatible namespaces
This patch does intentionally not touch any file name. Some of the
file names are a little weird now, e.g. \Cite\Cite. These can more
easily be renamed in later patches.

I used https://codesearch.wmflabs.org/search/?q=new%20Cite%5C( and it
looks like this code is not used anywhere else.

Change-Id: I5f93a224e9cacf45b7a0d68c216a78723364dd96
2019-11-20 17:00:13 +01:00

32 lines
745 B
PHP

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