From c1c4e42c8662da81e5bb61b4301a81e11d193c03 Mon Sep 17 00:00:00 2001 From: "Moritz Schubotz (physikerwelt)" Date: Sun, 20 May 2018 19:02:33 +0200 Subject: [PATCH] Improve tests coverage for MathFormatter Change-Id: I2c9141753b59d99a1caf84279a0afcaf8431e631 --- tests/phpunit/MathFormatterTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/phpunit/MathFormatterTest.php b/tests/phpunit/MathFormatterTest.php index 865bc30..070c807 100644 --- a/tests/phpunit/MathFormatterTest.php +++ b/tests/phpunit/MathFormatterTest.php @@ -65,6 +65,16 @@ class MathFormatterTest extends MediaWikiTestCase { $this->assertContains( '', $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 );