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
dispatchUser() should use a 302 http status code
[lhc/web/wiklou.git]
/
tests
/
parser
/
parserTests.php
diff --git
a/tests/parser/parserTests.php
b/tests/parser/parserTests.php
index
1d0867a
..
6a423d5
100644
(file)
--- a/
tests/parser/parserTests.php
+++ b/
tests/parser/parserTests.php
@@
-30,6
+30,8
@@
define( 'MW_PARSER_TEST', true );
require __DIR__ . '/../../maintenance/Maintenance.php';
require __DIR__ . '/../../maintenance/Maintenance.php';
+use MediaWiki\MediaWikiServices;
+
class ParserTestsMaintenance extends Maintenance {
function __construct() {
parent::__construct();
class ParserTestsMaintenance extends Maintenance {
function __construct() {
parent::__construct();
@@
-80,7
+82,7
@@
class ParserTestsMaintenance extends Maintenance {
}
public function execute() {
}
public function execute() {
- global $wg
ParserTestFiles, $wg
DBtype;
+ global $wgDBtype;
// Cases of weird db corruption were encountered when running tests on earlyish
// versions of SQLite
// Cases of weird db corruption were encountered when running tests on earlyish
// versions of SQLite
@@
-145,7
+147,8
@@
class ParserTestsMaintenance extends Maintenance {
$recorderLB = false;
if ( $record || $compare ) {
$recorderLB = false;
if ( $record || $compare ) {
- $recorderLB = wfGetLBFactory()->newMainLB();
+ $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+ $recorderLB = $lbFactory->newMainLB();
// This connection will have the wiki's table prefix, not parsertest_
$recorderDB = $recorderLB->getConnection( DB_MASTER );
// This connection will have the wiki's table prefix, not parsertest_
$recorderDB = $recorderLB->getConnection( DB_MASTER );
@@
-167,7
+170,7
@@
class ParserTestsMaintenance extends Maintenance {
}
// Default parser tests and any set from extensions or local config
}
// Default parser tests and any set from extensions or local config
- $files = $this->getOption( 'file',
$wgParserTestFiles
);
+ $files = $this->getOption( 'file',
ParserTestRunner::getParserTestFiles()
);
$norm = $this->hasOption( 'norm' ) ? explode( ',', $this->getOption( 'norm' ) ) : [];
$norm = $this->hasOption( 'norm' ) ? explode( ',', $this->getOption( 'norm' ) ) : [];