- $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 phpunit isn't available by autoloader try pulling it in
+ if ( !class_exists( 'PHPUnit_Framework_TestCase' ) ) {
+ require_once 'PHPUnit/Autoload.php';