From 7cae2517e5b0388a756e802e954c70b5b0669829 Mon Sep 17 00:00:00 2001 From: "Moritz Schubotz (physikerwelt)" Date: Fri, 26 Aug 2022 18:23:06 +0200 Subject: [PATCH] Minor: MathDatabaseTest cleaning * Remove unused constants * Refactor deprecated wfGetDB Change-Id: I926fbe59fd2fef9617da9870b8b9c2a6662f22df --- tests/phpunit/MathDatabaseTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/MathDatabaseTest.php b/tests/phpunit/MathDatabaseTest.php index 963317be8..732694251 100644 --- a/tests/phpunit/MathDatabaseTest.php +++ b/tests/phpunit/MathDatabaseTest.php @@ -20,10 +20,7 @@ class MathDatabaseTest extends MediaWikiIntegrationTestCase { */ private $renderer; private const SOME_TEX = "a+b"; - private const SOME_HTML = "ab and so on"; private const SOME_MATHML = "iℏ∂_tΨ=H^Ψ<\ci>"; - private const SOME_CONSERVATIVENESS = 2; - private const SOME_OUTPUTHASH = 'C65c884f742c8591808a121a828bc09f8<'; /** * creates a new database connection and a new math renderer @@ -33,11 +30,14 @@ class MathDatabaseTest extends MediaWikiIntegrationTestCase { * $this->tablesUsed[] = 'math'; * } * was not sufficient. + * @throws Exception */ protected function setUp(): void { parent::setUp(); // TODO: figure out why this is necessary - $this->db = wfGetDB( DB_PRIMARY ); + $this->db = $this->getServiceContainer() + ->getDBLoadBalancer() + ->getConnection( DB_PRIMARY ); $this->renderer = new MathMathML( self::SOME_TEX ); $this->tablesUsed[] = 'mathoid'; }