mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +00:00
Fix unit tests after I62259b76
The unit tests never set the title on the engine. Change-Id: Iefa11cacd4f10a1daa185b2e2a0d9620bbbfa6c6
This commit is contained in:
parent
3055ac6aa3
commit
ce46700ec9
|
@ -78,6 +78,7 @@ abstract class Scribunto_LuaEngineTestBase extends MediaWikiTestCase {
|
||||||
$engine = new $engineClass(
|
$engine = new $engineClass(
|
||||||
self::$engineConfigurations[$engineName] + array( 'parser' => $parser )
|
self::$engineConfigurations[$engineName] + array( 'parser' => $parser )
|
||||||
);
|
);
|
||||||
|
$engine->setTitle( $parser->getTitle() );
|
||||||
$engine->getInterpreter();
|
$engine->getInterpreter();
|
||||||
} catch ( Scribunto_LuaInterpreterNotFoundError $e ) {
|
} catch ( Scribunto_LuaInterpreterNotFoundError $e ) {
|
||||||
$suite->addTest(
|
$suite->addTest(
|
||||||
|
@ -161,6 +162,7 @@ abstract class Scribunto_LuaEngineTestBase extends MediaWikiTestCase {
|
||||||
$this->engine = new $class(
|
$this->engine = new $class(
|
||||||
self::$engineConfigurations[$this->engineName] + array( 'parser' => $parser )
|
self::$engineConfigurations[$this->engineName] + array( 'parser' => $parser )
|
||||||
);
|
);
|
||||||
|
$this->engine->setTitle( $parser->getTitle() );
|
||||||
}
|
}
|
||||||
return $this->engine;
|
return $this->engine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ class Scribunto_LuaEnvironmentComparisonTest extends MediaWikiTestCase {
|
||||||
$engine = new Scribunto_LuaSandboxEngine(
|
$engine = new Scribunto_LuaSandboxEngine(
|
||||||
array( 'parser' => $parser ) + $this->sandboxOpts
|
array( 'parser' => $parser ) + $this->sandboxOpts
|
||||||
);
|
);
|
||||||
|
$engine->setTitle( $parser->getTitle() );
|
||||||
$engine->getInterpreter();
|
$engine->getInterpreter();
|
||||||
$this->engines['LuaSandbox'] = $engine;
|
$this->engines['LuaSandbox'] = $engine;
|
||||||
} catch ( Scribunto_LuaInterpreterNotFoundError $e ) {
|
} catch ( Scribunto_LuaInterpreterNotFoundError $e ) {
|
||||||
|
@ -39,6 +40,7 @@ class Scribunto_LuaEnvironmentComparisonTest extends MediaWikiTestCase {
|
||||||
$engine = new Scribunto_LuaStandaloneEngine(
|
$engine = new Scribunto_LuaStandaloneEngine(
|
||||||
array( 'parser' => $parser ) + $this->standaloneOpts
|
array( 'parser' => $parser ) + $this->standaloneOpts
|
||||||
);
|
);
|
||||||
|
$engine->setTitle( $parser->getTitle() );
|
||||||
$engine->getInterpreter();
|
$engine->getInterpreter();
|
||||||
$this->engines['LuaStandalone'] = $engine;
|
$this->engines['LuaStandalone'] = $engine;
|
||||||
} catch ( Scribunto_LuaInterpreterNotFoundError $e ) {
|
} catch ( Scribunto_LuaInterpreterNotFoundError $e ) {
|
||||||
|
|
Loading…
Reference in a new issue