mediawiki-extensions-Math/tests/phpunit/MathIdTest.php
Moritz Schubotz (physikerwelt) 110656335f Remove PNG rendering mode
Removes functionality to
* select PNG rendering mode
* automated fallback to PNG images for SVG rendering
* PNG mode related class and tests

However, PNG images received from mathoid / restbase are still stored.

Bug: T311620
Change-Id: I595926027433182cc0396570bc3f1ce0cd2cafb3
2022-11-21 18:57:27 +00:00

28 lines
600 B
PHP

<?php
use MediaWiki\Extension\Math\MathConfig;
/**
* Test the Id feature
*
* @covers \MediaWiki\Extension\Math\MathRenderer
*
* @group Math
*
* @license GPL-2.0-or-later
*/
class MathIdTest extends MediaWikiIntegrationTestCase {
/**
* Checks if the id specified as attribute is set in the renderer object
*/
public function testBasics() {
$randomId = 'a_random_id';
$renderer = $this->getServiceContainer()
->get( 'Math.RendererFactory' )
->getRenderer( "a+b", [ 'id' => $randomId ], MathConfig::MODE_MATHML );
$this->assertEquals( $randomId, $renderer->getID() );
}
}