mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2025-01-08 12:54:08 +00:00
707ad58598
Use WANObjectCache rather than genuine DB tables for greater flexibility. Note, this commit is the second step of Ifd89e2d9cb30fa15cc318f077b434207ed6b7214 Bug: T252390 Change-Id: Ifa7d943875f05088ef697a5a18ad292342a9b4ad
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
use MediaWiki\Extension\Math\InputCheck\InputCheckFactory;
|
|
use MediaWiki\Extension\Math\InputCheck\MathoidChecker;
|
|
|
|
/**
|
|
* @covers MediaWiki\Extension\Math\InputCheck\InputCheckFactory
|
|
*/
|
|
class InputCheckFactoryTest extends MediaWikiUnitTestCase {
|
|
use FactoryArgTestTrait;
|
|
|
|
protected static function getFactoryClass() {
|
|
return InputCheckFactory::class;
|
|
}
|
|
|
|
protected static function getInstanceClass() {
|
|
return MathoidChecker::class;
|
|
}
|
|
|
|
protected static function getExtraClassArgCount() {
|
|
return 2;
|
|
}
|
|
|
|
/**
|
|
* This is required since the FactoryArgTestTrait uses the full classname.
|
|
* Testing without overwriting this function would result in
|
|
*
|
|
* ReflectionException: Method MediaWiki\Extension\Math\InputCheck\InputCheckFactory::
|
|
* newMediaWiki\Extension\Math\InputCheck\MathoidChecker() does not exist
|
|
*
|
|
* see T253613
|
|
* @return string
|
|
*/
|
|
protected function getFactoryMethodName() {
|
|
return 'new' . ( new \ReflectionClass( MathoidChecker::class ) )->getShortName();
|
|
}
|
|
|
|
protected function setUp():void {
|
|
parent::setUp();
|
|
$this->markTestSkipped( 'FactoryArgTestTrait can not yet handle the parameter numbers.' );
|
|
}
|
|
}
|