mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-04 20:18:35 +00:00
9b7205599c
This is doing a bulk of the job of creating a service for working with math modes configuration. There's still things to do, like moving math mode names, and perhaps depending on default user options to provide a bit more convenience, but that will be the next step. Change-Id: I1259a93651920f44104f2f5135e3e620c858be8d
28 lines
597 B
PHP
28 lines
597 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\Math\MathConfig;
|
|
|
|
/**
|
|
* Test the Id feature
|
|
*
|
|
* @covers \MediaWiki\Extension\Math\MathRenderer
|
|
*
|
|
* @group Math
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
*/
|
|
class MathIdTest extends MediaWikiIntegrationTestCase {
|
|
|
|
/**
|
|
* Checks if the id specified as attribute is set in the renderer object
|
|
*/
|
|
public function testBasics() {
|
|
$randomId = 'a_random_id';
|
|
$renderer = $this->getServiceContainer()
|
|
->get( 'Math.RendererFactory' )
|
|
->getRenderer( "a+b", [ 'id' => $randomId ], MathConfig::MODE_PNG );
|
|
$this->assertEquals( $randomId, $renderer->getID() );
|
|
}
|
|
|
|
}
|