mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-01 10:46:36 +00:00
6699724d65
Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Change-Id: I1d2604e3f246ede58ff8245ba2b940f258d2d80c
24 lines
447 B
PHP
24 lines
447 B
PHP
<?php
|
|
|
|
/**
|
|
* Test the Id feature
|
|
*
|
|
* @covers MathRenderer
|
|
*
|
|
* @group Math
|
|
*
|
|
* @licence GNU GPL v2+
|
|
*/
|
|
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() );
|
|
}
|
|
|
|
}
|