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 );
|
$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() {
|
public function testFormatPlain() {
|
||||||
$formatter = new MathFormatter( SnakFormatter::FORMAT_PLAIN );
|
$formatter = new MathFormatter( SnakFormatter::FORMAT_PLAIN );
|
||||||
$value = new StringValue( self::SOME_TEX );
|
$value = new StringValue( self::SOME_TEX );
|
||||||
|
|
Loading…
Reference in New Issue