mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-30 17:54:20 +00:00
2ff327df53
> We lose useful coverage and spend valuable time keeping these tags > accurate through refactors (or worse, forget to do so). > > I am not disabling the "only track coverage of specified subject" > benefits, nor am I claiming coverage in in classes outside the > subject under test. > > Tracking tiny per-method details wastes time in keeping tags > in sync during refactors, and time to realize (and fix) when people > inevitably don't keep them in sync, and time lost in finding > uncovered code to write tests for only to realize it was already > covered but "not yet claimed". https://gerrit.wikimedia.org/r/q/owner:Krinkle+is:merged+message:%2522Widen%2522 Change-Id: Iafa241210b81ba1cbfee74e3920fb044c86d09fc
30 lines
701 B
PHP
30 lines
701 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'] );
|
|
}
|
|
|
|
}
|