summaryrefslogtreecommitdiff
path: root/maintenance/checkLess.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /maintenance/checkLess.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'maintenance/checkLess.php')
-rw-r--r--maintenance/checkLess.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/maintenance/checkLess.php b/maintenance/checkLess.php
index b97e1b0b..2f533cf4 100644
--- a/maintenance/checkLess.php
+++ b/maintenance/checkLess.php
@@ -22,7 +22,6 @@
*/
require_once __DIR__ . '/Maintenance.php';
-require_once 'PHPUnit/Autoload.php';
/**
* @ingroup Maintenance
@@ -43,6 +42,17 @@ class CheckLess extends Maintenance {
// require it here.
require_once __DIR__ . '/../tests/TestsAutoLoader.php';
+ // 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 = array(
"$IP/tests/phpunit/phpunit.php",