Merge "Improve test coverage for MathSource"

This commit is contained in:
jenkins-bot 2018-06-17 16:52:51 +00:00 committed by Gerrit Code Review
commit d5a3fd8a16
1 changed files with 14 additions and 4 deletions

View File

@ -3,16 +3,14 @@
/**
* Test the TeX source output format.
*
* @covers MathRenderer
*
* @group Math
* @covers MathSource
*
* @license GPL-2.0-or-later
*/
class MathSourceTest extends MediaWikiTestCase {
/**
* Checks the basic functionallity
* Checks the basic functionality
* i.e. if the span element is generated right.
*/
public function testBasics() {
@ -36,4 +34,16 @@ class MathSourceTest extends MediaWikiTestCase {
);
}
public function testConstructor() {
$renderer = new MathSource( 'a' );
$this->assertEquals( 'source', $renderer->getMode() );
}
public function testRender() {
$renderer = new MathSource( 'a+b' );
$this->assertTrue( $renderer->render() );
$this->assertFalse( $renderer->isChanged() );
}
}