diff --git a/tests/phpunit/MathPngTest.php b/tests/phpunit/MathPngTest.php new file mode 100644 index 000000000..236e8babc --- /dev/null +++ b/tests/phpunit/MathPngTest.php @@ -0,0 +1,29 @@ +'; + + public function testConstructor() { + $renderer = new MathPng( 'a' ); + + $this->assertEquals( 'png', $renderer->getMode() ); + } + + public function testOutput() { + $renderer = $this->getMockBuilder( MathPng::class ) + ->setMethods( [ 'getFallbackImage' ] ) + ->getMock(); + $renderer->method( 'getFallbackImage' ) + ->willReturn( self::TEST_DUMMY ); + + $this->assertSame( self::TEST_DUMMY, $renderer->getHtmlOutput() ); + } + +}