Improve tests coverage for MathFormatter

Change-Id: I2c9141753b59d99a1caf84279a0afcaf8431e631
This commit is contained in:
Moritz Schubotz (physikerwelt) 2018-05-20 19:02:33 +02:00 committed by Physikerwelt
parent 6f32168683
commit c1c4e42c86
1 changed files with 10 additions and 0 deletions

View File

@ -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 );