Merge "Schema is not PostgreSQL connection parameter"
[lhc/web/wiklou.git] / tests / phpunit / LessFileCompilationTest.php
index 62157d2..71e0f4b 100644 (file)
@@ -6,7 +6,7 @@
  * @see https://github.com/sebastianbergmann/phpunit/blob/master/src/Extensions/PhptTestCase.php
  * @author Sam Smith <samsmith@wikimedia.org>
  */
-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 = static::getResourceLoaderContext();
+
+               // Bleh
+               $method = new ReflectionMethod( $this->module, 'getLessCompiler' );
+               $method->setAccessible( true );
+               $compiler = $method->invoke( $this->module, $rlContext );
+
                $this->assertNotNull( $compiler->compileFile( $this->file ) );
        }