mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 08:14:09 +00:00
Kill hack for the PHPUnit migration
Bug: T192167 Change-Id: Ic86f6fc67555d2e678ce46f6ad34a25236b560af
This commit is contained in:
parent
3a19bb8b0c
commit
2e1306fa45
|
@ -72,7 +72,7 @@ trait Scribunto_LuaEngineTestHelper {
|
|||
$engineSuite->setName( "$engineName: $className" );
|
||||
|
||||
foreach ( $class->getMethods() as $method ) {
|
||||
if ( self::isTestMethod( $method ) && $method->isPublic() ) {
|
||||
if ( Test::isTestMethod( $method ) && $method->isPublic() ) {
|
||||
$name = $method->getName();
|
||||
$groups = Test::getGroups( $className, $name );
|
||||
$groups[] = 'Lua';
|
||||
|
@ -113,23 +113,6 @@ trait Scribunto_LuaEngineTestHelper {
|
|||
return $suite;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary helper for the duration of PHPUnit 8 migration
|
||||
* @fixme Remove after migration is over
|
||||
*
|
||||
* @param ReflectionMethod $method
|
||||
* @return bool
|
||||
*/
|
||||
private static function isTestMethod( ReflectionMethod $method ) : bool {
|
||||
// PHPUnit 6
|
||||
if ( method_exists( TestSuite::class, 'isTestMethod' ) ) {
|
||||
return TestSuite::isTestMethod( $method );
|
||||
}
|
||||
|
||||
// PHPUnit 8
|
||||
return Test::isTestMethod( $method );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ScribuntoEngineBase
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue