dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add SessionInfo force-use flag
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
phpunit.php
diff --git
a/tests/phpunit/phpunit.php
b/tests/phpunit/phpunit.php
index
77690cd
..
d876c45
100755
(executable)
--- a/
tests/phpunit/phpunit.php
+++ b/
tests/phpunit/phpunit.php
@@
-139,6
+139,10
@@
class PHPUnitMaintClass extends Maintenance {
// may break testing against floating point values
// treated with PHP's serialize()
ini_set( 'serialize_precision', 17 );
// may break testing against floating point values
// treated with PHP's serialize()
ini_set( 'serialize_precision', 17 );
+
+ // TODO: we should call MediaWikiTestCase::prepareServices( new GlobalVarConfig() ) here.
+ // But PHPUnit may not be loaded yet, so we have to wait until just
+ // before PHPUnit_TextUI_Command::main() is executed at the end of this file.
}
public function execute() {
}
public function execute() {
@@
-237,4
+241,9
@@
echo defined( 'HHVM_VERSION' ) ?
'Using HHVM ' . HHVM_VERSION . ' (' . PHP_VERSION . ")\n" :
'Using PHP ' . PHP_VERSION . "\n";
'Using HHVM ' . HHVM_VERSION . ' (' . PHP_VERSION . ")\n" :
'Using PHP ' . PHP_VERSION . "\n";
+// Prepare global services for unit tests.
+// FIXME: this should be done in the finalSetup() method,
+// but PHPUnit may not have been loaded at that point.
+MediaWikiTestCase::prepareServices( new GlobalVarConfig() );
+
$wgPhpUnitClass::main();
$wgPhpUnitClass::main();