2014-01-03 14:29:03 +00:00
|
|
|
<?php
|
2016-02-12 16:57:37 +00:00
|
|
|
|
2014-01-03 14:29:03 +00:00
|
|
|
/**
|
2016-02-12 16:57:37 +00:00
|
|
|
* @covers MathInputCheck
|
|
|
|
*
|
2014-07-24 00:12:14 +00:00
|
|
|
* @group Math
|
2016-02-12 16:57:37 +00:00
|
|
|
*
|
|
|
|
* @licence GNU GPL v2+
|
2014-01-03 14:29:03 +00:00
|
|
|
*/
|
2017-06-20 07:11:57 +00:00
|
|
|
class MathInputCheckTest extends MediaWikiTestCase {
|
2014-01-03 14:29:03 +00:00
|
|
|
/**
|
|
|
|
* @covers MathInputCheck::isValid
|
|
|
|
*/
|
|
|
|
public function testIsValid() {
|
|
|
|
$InputCheck = $this->getMockBuilder( 'MathInputCheck' )->getMock();
|
2014-03-11 15:53:03 +00:00
|
|
|
$this->assertEquals( $InputCheck->IsValid(), false );
|
2014-01-03 14:29:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers MathInputCheck::getError
|
|
|
|
* @todo Implement testGetError().
|
|
|
|
*/
|
|
|
|
public function testGetError() {
|
|
|
|
$InputCheck = $this->getMockBuilder( 'MathInputCheck' )->getMock();
|
|
|
|
$this->assertNull( $InputCheck->getError() );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers MathInputCheck::getValidTex
|
|
|
|
*/
|
|
|
|
public function testGetValidTex() {
|
|
|
|
$InputCheck = $this->getMockBuilder( 'MathInputCheck' )
|
2016-04-12 20:53:25 +00:00
|
|
|
->setConstructorArgs( [ 'some tex input' ] )
|
2014-01-03 14:29:03 +00:00
|
|
|
->getMock();
|
|
|
|
$this->assertNull( $InputCheck->getValidTex() );
|
|
|
|
}
|
|
|
|
}
|