X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.php;h=6a423d5cb3b87f4b3a99e8799bc3f598b1337514;hb=5c357bf6c28eb0c3462374e088a6583eecbd2953;hp=2735f93e0dda931299a1f32d8ef0bfb3369278db;hpb=51cb436f3811d4c462124eb19b6f60ee7336fe81;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.php b/tests/parser/parserTests.php index 2735f93e0d..6a423d5cb3 100644 --- a/tests/parser/parserTests.php +++ b/tests/parser/parserTests.php @@ -30,6 +30,8 @@ define( 'MW_PARSER_TEST', true ); require __DIR__ . '/../../maintenance/Maintenance.php'; +use MediaWiki\MediaWikiServices; + class ParserTestsMaintenance extends Maintenance { function __construct() { parent::__construct(); @@ -145,7 +147,8 @@ class ParserTestsMaintenance extends Maintenance { $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 );