mediawiki-extensions-Scribunto/tests/phpunit/engines/LuaCommon/LuaEngineTestSkip.php
Reedy 62e1fb0b5f Namespace LuaCommon
Change-Id: Ib6e912e71fb797942aca4b4f22eb0ff9e005a662
2022-08-03 06:03:57 +00:00

32 lines
652 B
PHP

<?php
class 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;
}
}