Math/tests/MathIdTest.php
physikerwelt 6699724d65 Convert all array() syntax to []
Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Change-Id: I1d2604e3f246ede58ff8245ba2b940f258d2d80c
2016-04-13 10:18:23 -04:00

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() );
}
}