X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FLessFileCompilationTest.php;h=df4690a4f69d8b4f122eafc2293b260846d16134;hb=dabf4e9b833fed9942bd5a7c950893a54e43b0a3;hp=62157d28d8ab8e71b6ba66f8807a139a23cc062c;hpb=1aad5d4bf7c0bb72fc59de00a6c8998f37abde4b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/LessFileCompilationTest.php b/tests/phpunit/LessFileCompilationTest.php index 62157d28d8..df4690a4f6 100644 --- a/tests/phpunit/LessFileCompilationTest.php +++ b/tests/phpunit/LessFileCompilationTest.php @@ -6,7 +6,7 @@ * @see https://github.com/sebastianbergmann/phpunit/blob/master/src/Extensions/PhptTestCase.php * @author Sam Smith */ -class LessFileCompilationTest extends MediaWikiTestCase { +class LessFileCompilationTest extends ResourceLoaderTestCase { /** * @var string $file @@ -38,7 +38,13 @@ class LessFileCompilationTest extends MediaWikiTestCase { "$thisString must refer to a readable file" ); - $compiler = ResourceLoader::getLessCompiler( RequestContext::getMain()->getConfig() ); + $rlContext = $this->getResourceLoaderContext(); + + // Bleh + $method = new ReflectionMethod( $this->module, 'getLessCompiler' ); + $method->setAccessible( true ); + $compiler = $method->invoke( $this->module, $rlContext ); + $this->assertNotNull( $compiler->compileFile( $this->file ) ); }