From ddffa1767fffaf76dadb79c0426cba50c9a2c3f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Wed, 24 Jul 2019 23:52:24 +0200 Subject: [PATCH] Replace wfGetDB in ParserTestRunner After I0d7dacee3, wfGetDB returns a connection reference instead of a real connection, which means it can't be passed to CloneDatabase anymore, and testcase / test runner classes should avoid it. Bug: T228928 Change-Id: I42be4214e33a4d4f8d53fafc925c8d708b4c0106 --- tests/parser/ParserTestRunner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index ba850276f2..e3c20a2cee 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -1302,7 +1302,7 @@ class ParserTestRunner { public function setupDatabase( $nextTeardown = null ) { global $wgDBprefix; - $this->db = wfGetDB( DB_MASTER ); + $this->db = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_MASTER ); $dbType = $this->db->getType(); if ( $dbType == 'oracle' ) { -- 2.20.1