Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
[mediawiki.git] / tests / phpunit / includes / resourceloader / ResourceLoaderLESSTest.php
blob75e54d35821ecd462166e3ed7d4fe361bddafa06
1 <?php
3 class ResourceLoaderLESSTest extends MediaWikiTestCase {
4 public static function lessProvider() {
5 $result = array();
6 foreach ( glob( __DIR__ . '/fixtures/*.less' ) as $file ) {
7 $result[] = array( $file );
10 return $result;
13 /**
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" );
20 return;
23 $expect = file_get_contents( $cssFile );
24 $content = file_get_contents( $lessFile );
25 $result = ResourceLoader::getLessCompiler()->compile( $content, $lessFile );
26 $this->assertEquals( $expect, $result );