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
|
|
|
*
|
2018-04-13 14:06:39 +00:00
|
|
|
* @license GPL-2.0-or-later
|
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() {
|
2018-06-06 10:13:04 +00:00
|
|
|
$InputCheck = $this->getMockBuilder( MathInputCheck::class )->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() {
|
2018-06-06 10:13:04 +00:00
|
|
|
$InputCheck = $this->getMockBuilder( MathInputCheck::class )->getMock();
|
2014-01-03 14:29:03 +00:00
|
|
|
$this->assertNull( $InputCheck->getError() );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers MathInputCheck::getValidTex
|
|
|
|
*/
|
|
|
|
public function testGetValidTex() {
|
2018-06-06 10:13:04 +00:00
|
|
|
$InputCheck = $this->getMockBuilder( MathInputCheck::class )
|
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() );
|
|
|
|
}
|
|
|
|
}
|