13 use MediaWikiCoversValidator;
14 use PHPUnit4And6Compat;
47 $name =
null, array $data = [], $dataName =
'',
$engineName =
null
53 parent::__construct( $name, $data, $dataName );
56 public static function suite( $className ) {
61 if ( $this->luaDataProvider ) {
62 $this->luaDataProvider->destroy();
63 $this->luaDataProvider =
null;
65 if ( $this->engine ) {
66 $this->engine->destroy();
75 if ( $this->luaTestName ) {
78 return $this->engineName .
': ' . parent::toString();
83 'TestFramework' => __DIR__ .
'/TestFramework.lua',
88 if ( !$this->luaDataProvider ) {
89 $class = static::$dataProviderClass;
90 $this->luaDataProvider =
new $class ( $this->
getEngine(), static::$moduleName );
101 public function testLua( $key, $testName, $expected ) {
102 $this->luaTestName = static::$moduleName .
"[$key]: $testName";
103 if ( isset( $this->skipTests[$testName] ) ) {
104 $this->markTestSkipped( $this->skipTests[$testName] );
115 $this->assertSame( $expected, $actual );
117 $this->luaTestName =
null;