mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-19 11:21:48 +00:00
18d122b60d
This reverts commit 62e1fb0b5f
.
Reason for revert: caused several errors:
* unnamespaced HooksTest collides with core’s class of the same name
* Scribunto_LuaError renamed without class alias despite being used in Wikibase
Bug: T314464
Change-Id: I8b151327236bf86945e59823fba155497e4b3fc6
32 lines
662 B
PHP
32 lines
662 B
PHP
<?php
|
|
|
|
class Scribunto_LuaEngineTestSkip extends PHPUnit\Framework\TestCase {
|
|
/** @var string */
|
|
private $className;
|
|
/** @var string */
|
|
private $message;
|
|
|
|
/**
|
|
* @param string $className Class being skipped
|
|
* @param string $message Skip message
|
|
*/
|
|
public function __construct( $className = '', $message = '' ) {
|
|
$this->className = $className;
|
|
$this->message = $message;
|
|
parent::__construct( 'testDummy' );
|
|
}
|
|
|
|
public function testDummy() {
|
|
if ( $this->className ) {
|
|
$this->markTestSkipped( $this->message );
|
|
} else {
|
|
// Dummy
|
|
$this->assertTrue( true );
|
|
}
|
|
}
|
|
|
|
public function toString(): string {
|
|
return $this->className;
|
|
}
|
|
}
|