addDescription( 'Checks LESS files for errors by running the LessTestSuite PHPUnit test suite' ); } public function execute() { global $IP; // NOTE (phuedx, 2014-03-26) wgAutoloadClasses isn't set up // by either of the dependencies at the top of the file, so // require it here. self::requireTestsAutoloader(); // If phpunit isn't available by autoloader try pulling it in if ( !class_exists( 'PHPUnit\\Framework\\TestCase' ) ) { require_once 'PHPUnit/Autoload.php'; } // RequestContext::resetMain() will print warnings unless this // is defined. if ( !defined( 'MW_PHPUNIT_TEST' ) ) { define( 'MW_PHPUNIT_TEST', true ); } $textUICommand = new PHPUnit_TextUI_Command(); $argv = [ "$IP/tests/phpunit/phpunit.php", "$IP/tests/phpunit/suites/LessTestSuite.php" ]; $textUICommand->run( $argv ); } } $maintClass = CheckLess::class; require_once RUN_MAINTENANCE_IF_MAIN;