mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
Minor: MathDatabaseTest cleaning
* Remove unused constants * Refactor deprecated wfGetDB Change-Id: I926fbe59fd2fef9617da9870b8b9c2a6662f22df
This commit is contained in:
parent
580571e067
commit
7cae2517e5
|
@ -20,10 +20,7 @@ class MathDatabaseTest extends MediaWikiIntegrationTestCase {
|
|||
*/
|
||||
private $renderer;
|
||||
private const SOME_TEX = "a+b";
|
||||
private const SOME_HTML = "a<sub>b</sub> and so on";
|
||||
private const SOME_MATHML = "iℏ∂_tΨ=H^Ψ<mrow><\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';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue