Debian Codegraph @

extensions/Scribunto/tests/phpunit/Engines/LuaCommon/LuaEngineTestSkip.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
4
5 use PHPUnit\Framework\TestCase;
6
7 class LuaEngineTestSkip extends TestCase {
8 /** @var string */
9 private $className;
10 /** @var string */
11 private $message;
12
13 /**
14 * @param string $className Class being skipped
15 * @param string $message Skip message
16 */
17 public function __construct( $className = '', $message = '' ) {
18 $this->className = $className;
19 $this->message = $message;
20 parent::__construct( 'testDummy' );
21 }
22
23 public function testDummy() {
24 if ( $this->className ) {
25 $this->markTestSkipped( $this->message );
26 } else {
27 // Dummy
28 $this->assertTrue( true );
29 }
30 }
31
32 public function toString(): string {
33 return $this->className;
34 }
35 }