mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 23:46:39 +00:00
b189280467
Some mentioned a "__constructor", which should be "__construct". The leading backslash is not strictly needed by all tools. But some need it. I learned it's best practice to always have it. Change-Id: I22fe3a3b4828c02ab5a457aba9af5af1c72567ea
24 lines
453 B
PHP
24 lines
453 B
PHP
<?php
|
|
|
|
/**
|
|
* Test the Id feature
|
|
*
|
|
* @covers \MathRenderer
|
|
*
|
|
* @group Math
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
*/
|
|
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() );
|
|
}
|
|
|
|
}
|