- $hadErrors = false;
- foreach ( $module->getAllStyleFiles() as $file ) {
- if ( $module->getStyleSheetLang( $file ) !== 'less' ) {
- continue;
- }
- try {
- $compiler = ResourceLoader::getLessCompiler();
- $compiler->compileFile( $file );
- } catch ( Exception $e ) {
- if ( !$hadErrors ) {
- $this->error( "Errors checking module $name:\n" );
- $hadErrors = true;
- }
- $this->error( $e->getMessage() . "\n" );
- $result = true;
- }
- }
- }
- if ( !$result ) {
- $this->output( "No errors found\n" );
- } else {
- die( 1 );
- }
+ $textUICommand = new PHPUnit_TextUI_Command();
+ $argv = array(
+ "$IP/tests/phpunit/phpunit.php",
+ "$IP/tests/phpunit/suites/LessTestSuite.php"
+ );
+ $textUICommand->run( $argv );