Merge "Remove ESLint inline comments in WebdriverIO configuration files"
[lhc/web/wiklou.git] / tests / phpunit / LessFileCompilationTest.php
index 6ebbcb2..5e1f1a9 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,12 +38,12 @@ class LessFileCompilationTest extends MediaWikiTestCase {
                        "$thisString must refer to a readable file"
                );
 
-               $compiler = ResourceLoader::getLessCompiler();
-               $this->assertNotNull( $compiler->compileFile( $this->file ) );
-       }
+               $rlContext = $this->getResourceLoaderContext();
 
-       public function getName( $withDataSet = true ) {
-               return $this->toString();
+               // Bleh
+               $method = new ReflectionMethod( $this->module, 'compileLessFile' );
+               $method->setAccessible( true );
+               $this->assertNotNull( $method->invoke( $this->module, $this->file, $rlContext ) );
        }
 
        public function toString() {