3 class ResourceLoaderLESSTest
extends MediaWikiTestCase
{
4 public static function lessProvider() {
6 foreach ( glob( __DIR__
. '/fixtures/*.less' ) as $file ) {
7 $result[] = array( $file );
14 * @dataProvider lessProvider
16 public function testLessFile( $lessFile ) {
17 $cssFile = substr( $lessFile, 0, -4 ) . 'css';
18 if ( !file_exists( $cssFile ) ) {
19 $this->fail( "No css file found to assert equal to $lessFile" );
23 $expect = file_get_contents( $cssFile );
24 $content = file_get_contents( $lessFile );
25 $result = ResourceLoader
::getLessCompiler()->compile( $content, $lessFile );
26 $this->assertEquals( $expect, $result );