mediawiki-extensions-Math/tests/phpunit/MathInputCheckTest.php
Thiemo Kreuz 5648b8e2c3 Make use of the …::class feature whenever possible
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
2018-06-06 12:13:04 +02:00

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() );
}
}