mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-15 03:34:10 +00:00
5648b8e2c3
Note that a class is not resolved this was. …::class is not a function call. It's more like a named string constant. Technically still a string. The advantage is that IDEs and tools like linters can much easier understand that these strings refer to a class, and list them in usage reports, renames, and such. Change-Id: I5225543dbb837685a1840837cb2772dd576cca38
38 lines
874 B
PHP
38 lines
874 B
PHP
<?php
|
|
|
|
/**
|
|
* @covers MathInputCheck
|
|
*
|
|
* @group Math
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
*/
|
|
class MathInputCheckTest extends MediaWikiTestCase {
|
|
/**
|
|
* @covers MathInputCheck::isValid
|
|
*/
|
|
public function testIsValid() {
|
|
$InputCheck = $this->getMockBuilder( MathInputCheck::class )->getMock();
|
|
$this->assertEquals( $InputCheck->IsValid(), false );
|
|
}
|
|
|
|
/**
|
|
* @covers MathInputCheck::getError
|
|
* @todo Implement testGetError().
|
|
*/
|
|
public function testGetError() {
|
|
$InputCheck = $this->getMockBuilder( MathInputCheck::class )->getMock();
|
|
$this->assertNull( $InputCheck->getError() );
|
|
}
|
|
|
|
/**
|
|
* @covers MathInputCheck::getValidTex
|
|
*/
|
|
public function testGetValidTex() {
|
|
$InputCheck = $this->getMockBuilder( MathInputCheck::class )
|
|
->setConstructorArgs( [ 'some tex input' ] )
|
|
->getMock();
|
|
$this->assertNull( $InputCheck->getValidTex() );
|
|
}
|
|
}
|