2014-07-22 22:42:48 +00:00
|
|
|
<?php
|
2016-02-12 16:57:37 +00:00
|
|
|
|
2014-07-22 22:42:48 +00:00
|
|
|
/**
|
|
|
|
* Test the Id feature
|
2016-02-12 16:57:37 +00:00
|
|
|
*
|
|
|
|
* @covers MathRenderer
|
|
|
|
*
|
2014-07-22 22:42:48 +00:00
|
|
|
* @group Math
|
2016-02-12 16:57:37 +00:00
|
|
|
*
|
2018-03-29 03:44:44 +00:00
|
|
|
* @license GNU GPL v2+
|
2014-07-22 22:42:48 +00:00
|
|
|
*/
|
|
|
|
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' );
|
2016-04-12 20:53:25 +00:00
|
|
|
$renderer = MathRenderer::getRenderer( "a+b", [ 'id' => RANDOM_ID ] );
|
2017-07-10 09:40:12 +00:00
|
|
|
$this->assertEquals( RANDOM_ID, $renderer->getID() );
|
2014-07-22 22:42:48 +00:00
|
|
|
}
|
|
|
|
|
2015-01-10 01:55:54 +00:00
|
|
|
}
|