mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-14 19:26:08 +00:00
Improve tests coverage for MathFormatter
Change-Id: I2c9141753b59d99a1caf84279a0afcaf8431e631
This commit is contained in:
parent
6f32168683
commit
c1c4e42c86
|
@ -65,6 +65,16 @@ class MathFormatterTest extends MediaWikiTestCase {
|
|||
$this->assertContains( '</math>', $resultFormat );
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers MathFormatter::format
|
||||
*/
|
||||
public function testUnknownFormatFailure() {
|
||||
$formatter = new MathFormatter( 'unknown/unknown' );
|
||||
$value = new StringValue( '\noTex' );
|
||||
$resultFormat = $formatter->format( $value );
|
||||
$this->assertContains( 'unknown function', $resultFormat );
|
||||
}
|
||||
|
||||
public function testFormatPlain() {
|
||||
$formatter = new MathFormatter( SnakFormatter::FORMAT_PLAIN );
|
||||
$value = new StringValue( self::SOME_TEX );
|
||||
|
|
Loading…
Reference in a new issue