From: Gergő Tisza Date: Wed, 24 Jul 2019 21:52:24 +0000 (+0200) Subject: Replace wfGetDB in ParserTestRunner X-Git-Tag: 1.34.0-rc.0~886^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=ddffa1767fffaf76dadb79c0426cba50c9a2c3f4;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ) {