MediaWiki
REL1_23
|
00001 <?php 00024 require_once __DIR__ . '/Maintenance.php'; 00025 require_once 'PHPUnit/Autoload.php'; 00026 00030 class CheckLess extends Maintenance { 00031 00032 public function __construct() { 00033 parent::__construct(); 00034 $this->mDescription = 'Checks LESS files for errors by running the LessTestSuite PHPUnit test suite'; 00035 } 00036 00037 public function execute() { 00038 global $IP; 00039 00040 // NOTE (phuedx, 2014-03-26) wgAutoloadClasses isn't set up 00041 // by either of the dependencies at the top of the file, so 00042 // require it here. 00043 require_once __DIR__ . '/../tests/TestsAutoLoader.php'; 00044 00045 $textUICommand = new PHPUnit_TextUI_Command(); 00046 $argv = array( 00047 "$IP/tests/phpunit/phpunit.php", 00048 "$IP/tests/phpunit/suites/LessTestSuite.php" 00049 ); 00050 $textUICommand->run( $argv ); 00051 } 00052 } 00053 00054 $maintClass = 'CheckLess'; 00055 require_once RUN_MAINTENANCE_IF_MAIN;