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
|
|
|
*
|
|
|
|
* @licence 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' );
|
|
|
|
$renderer = MathRenderer::getRenderer( "a+b", array( 'id' => RANDOM_ID ) );
|
|
|
|
$this->assertEquals( RANDOM_ID, $renderer->getId() );
|
|
|
|
}
|
|
|
|
|
2015-01-10 01:55:54 +00:00
|
|
|
}
|