X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FLessFileCompilationTest.php;h=73fa0b5dc386a1444e31be1607ad23e7ff0c5d8b;hb=804cc6885a5a98401cdef2617f1f61a9ba7d5851;hp=62157d28d8ab8e71b6ba66f8807a139a23cc062c;hpb=5bd9d408c59b3bd0a39cc528bf2cabd7c3c40eb9;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/LessFileCompilationTest.php b/tests/phpunit/LessFileCompilationTest.php index 62157d28d8..73fa0b5dc3 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,12 +38,14 @@ class LessFileCompilationTest extends MediaWikiTestCase { "$thisString must refer to a readable file" ); - $compiler = ResourceLoader::getLessCompiler( RequestContext::getMain()->getConfig() ); - $this->assertNotNull( $compiler->compileFile( $this->file ) ); - } + $rlContext = $this->getResourceLoaderContext(); - public function getName( $withDataSet = true ) { - return $this->toString(); + // Bleh + $method = new ReflectionMethod( $this->module, 'getLessCompiler' ); + $method->setAccessible( true ); + $compiler = $method->invoke( $this->module, $rlContext ); + + $this->assertNotNull( $compiler->compileFile( $this->file ) ); } public function toString() {