[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/maintenance/ -> checkLess.php (source)

   1  <?php
   2  /**
   3   * Checks LESS files in known resources for errors
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License along
  16   * with this program; if not, write to the Free Software Foundation, Inc.,
  17   * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18   * http://www.gnu.org/copyleft/gpl.html
  19   *
  20   * @file
  21   * @ingroup Maintenance
  22   */
  23  
  24  require_once  __DIR__ . '/Maintenance.php';
  25  require_once 'PHPUnit/Autoload.php';
  26  
  27  /**
  28   * @ingroup Maintenance
  29   */
  30  class CheckLess extends Maintenance {
  31  
  32  	public function __construct() {
  33          parent::__construct();
  34          $this->mDescription =
  35              'Checks LESS files for errors by running the LessTestSuite PHPUnit test suite';
  36      }
  37  
  38  	public function execute() {
  39          global $IP;
  40  
  41          // NOTE (phuedx, 2014-03-26) wgAutoloadClasses isn't set up
  42          // by either of the dependencies at the top of the file, so
  43          // require it here.
  44          require_once __DIR__ . '/../tests/TestsAutoLoader.php';
  45  
  46          $textUICommand = new PHPUnit_TextUI_Command();
  47          $argv = array(
  48              "$IP/tests/phpunit/phpunit.php",
  49              "$IP/tests/phpunit/suites/LessTestSuite.php"
  50          );
  51          $textUICommand->run( $argv );
  52      }
  53  }
  54  
  55  $maintClass = 'CheckLess';
  56  require_once RUN_MAINTENANCE_IF_MAIN;


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1