mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-15 03:34:10 +00:00
945ef79559
Change-Id: I5b9ba062f51dce9fcc10f7c31f37c137176bfff3
24 lines
452 B
PHP
24 lines
452 B
PHP
<?php
|
|
|
|
/**
|
|
* Test the Id feature
|
|
*
|
|
* @covers MathRenderer
|
|
*
|
|
* @group Math
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
*/
|
|
class MathIdTest extends MediaWikiTestCase {
|
|
|
|
/**
|
|
* Checks if the id specified as attribute is set in the renderer object
|
|
*/
|
|
public function testBasics() {
|
|
define( 'RANDOM_ID', 'a_random_id' );
|
|
$renderer = MathRenderer::getRenderer( "a+b", [ 'id' => RANDOM_ID ] );
|
|
$this->assertEquals( RANDOM_ID, $renderer->getID() );
|
|
}
|
|
|
|
}
|