Improve test coverage for MathSource

Change-Id: I82d76db4b087b6472c2856806c70f4ef1ffbc8df
This commit is contained in:
Moritz Schubotz (physikerwelt) 2018-06-08 16:25:11 +02:00
parent ec99401072
commit 9a04cd6de3
No known key found for this signature in database
GPG Key ID: 73D26C61BAB32E94
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() );
}
}