mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-12 16:05:09 +00:00
30 lines
657 B
PHP
30 lines
657 B
PHP
|
<?php
|
||
|
|
||
|
use MediaWiki\Extension\Math\MathNativeMML;
|
||
|
|
||
|
/**
|
||
|
* Test the native MathML output format.
|
||
|
*
|
||
|
* @covers \MediaWiki\Extension\Math\MathNativeMML
|
||
|
*
|
||
|
* @group Math
|
||
|
*
|
||
|
* @license GPL-2.0-or-later
|
||
|
*/
|
||
|
class MathNativeMMLTest extends MediaWikiIntegrationTestCase {
|
||
|
|
||
|
protected function setUp(): void {
|
||
|
parent::setUp();
|
||
|
$this->setMwGlobals( 'wgMathValidModes', [ 'native' ] );
|
||
|
}
|
||
|
|
||
|
public function testSin() {
|
||
|
$mml = new MathNativeMML( '\sin' );
|
||
|
$this->assertSame( 'tex', $mml->getInputType() );
|
||
|
$this->assertTrue( $mml->checkTeX() );
|
||
|
$this->assertTrue( $mml->render() );
|
||
|
$this->assertStringContainsString( 'sin', $mml->getMathml() );
|
||
|
}
|
||
|
|
||
|
}
|