mediawiki-extensions-Math/tests/MathIdTest.php
libraryupgrader 5a076f94aa build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment

Change-Id: Ia8000677263c4150d4900526bcba1c0602664b8e
2018-03-29 03:44:44 +00:00

24 lines
447 B
PHP

<?php
/**
* Test the Id feature
*
* @covers MathRenderer
*
* @group Math
*
* @license 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() );
}
}