There's definitely better way than doing this...
if ( !ExtensionRegistry::getInstance()->isLoaded( 'Scribunto' ) ) { /** * Fake base class in case Scribunto is not available. * * @license GPL-2.0-or-later * @author Marius Hoch < hoo@online.de > */ abstract class Scribunto_LuaWikibaseLibraryTestCase extends \PHPUnit\Framework\TestCase { protected function setUp() : void { $this->markTestSkipped( 'Scribunto is not available' ); } public function testPlaceholder() { $this->fail( 'PHPunit expects this class to have tests. This should never run.' ); } } return; }