MediaWiki  REL1_24
checkLess.php
Go to the documentation of this file.
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 =
00035             'Checks LESS files for errors by running the LessTestSuite PHPUnit test suite';
00036     }
00037 
00038     public function execute() {
00039         global $IP;
00040 
00041         // NOTE (phuedx, 2014-03-26) wgAutoloadClasses isn't set up
00042         // by either of the dependencies at the top of the file, so
00043         // require it here.
00044         require_once __DIR__ . '/../tests/TestsAutoLoader.php';
00045 
00046         $textUICommand = new PHPUnit_TextUI_Command();
00047         $argv = array(
00048             "$IP/tests/phpunit/phpunit.php",
00049             "$IP/tests/phpunit/suites/LessTestSuite.php"
00050         );
00051         $textUICommand->run( $argv );
00052     }
00053 }
00054 
00055 $maintClass = 'CheckLess';
00056 require_once RUN_MAINTENANCE_IF_MAIN;