mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 01:10:09 +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 $renderer;
|
||||||
private const SOME_TEX = "a+b";
|
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_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
|
* creates a new database connection and a new math renderer
|
||||||
|
@ -33,11 +30,14 @@ class MathDatabaseTest extends MediaWikiIntegrationTestCase {
|
||||||
* $this->tablesUsed[] = 'math';
|
* $this->tablesUsed[] = 'math';
|
||||||
* }
|
* }
|
||||||
* was not sufficient.
|
* was not sufficient.
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function setUp(): void {
|
protected function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
// TODO: figure out why this is necessary
|
// 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->renderer = new MathMathML( self::SOME_TEX );
|
||||||
$this->tablesUsed[] = 'mathoid';
|
$this->tablesUsed[] = 'mathoid';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue