mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-15 03:34:10 +00:00
5a076f94aa
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
24 lines
447 B
PHP
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() );
|
|
}
|
|
|
|
}
|