MediaWiki
1.34.0
|
This is the subclass for Lua library tests. More...
Public Member Functions | |
__construct ( $name=null, array $data=[], $dataName='', $engineName=null) | |
provideLuaData () | |
testLua ( $key, $testName, $expected) | |
@dataProvider provideLuaData More... | |
toString () | |
Static Public Member Functions | |
static | suite ( $className) |
Protected Member Functions | |
getTestModules () | |
tearDown () | |
Protected Attributes | |
string | $luaTestName = null |
Name to display instead of the default. More... | |
array | $skipTests = [] |
Tests to skip. More... | |
Static Protected Attributes | |
static string | $dataProviderClass = 'Scribunto_LuaDataProvider' |
Class to use for the data provider. More... | |
static string | $moduleName = null |
Name of the module being tested. More... | |
Private Attributes | |
$engine = null | |
$engineName = null | |
$luaDataProvider = null | |
Static Private Attributes | |
static | $staticEngineName = null |
This is the subclass for Lua library tests.
It will automatically run all tests against LuaSandbox and LuaStandalone.
Most of the time, you'll only need to override the following:
Definition at line 12 of file LuaEngineUnitTestBase.php.
Scribunto_LuaEngineUnitTestBase::__construct | ( | $name = null , |
|
array | $data = [] , |
||
$dataName = '' , |
|||
$engineName = null |
|||
) |
Reimplemented in Scribunto_LuaLanguageLibraryTest, and Scribunto_LuaTextLibraryTest.
Definition at line 46 of file LuaEngineUnitTestBase.php.
References $engineName, and $staticEngineName.
|
protected |
Reimplemented in Scribunto_LuaTextLibraryTest, Scribunto_LuaLanguageLibraryTest, Scribunto_LuaStandaloneTest, Scribunto_LuaUstringLibraryTest, Scribunto_LuaHtmlLibraryTest, Scribunto_LuaSandboxTest, Scribunto_LuaHashLibraryTest, Scribunto_LuaLibraryUtilTest, Scribunto_LuaMessageLibraryTest, and Scribunto_LuaSiteLibraryTest.
Definition at line 81 of file LuaEngineUnitTestBase.php.
Scribunto_LuaEngineUnitTestBase::provideLuaData | ( | ) |
Definition at line 87 of file LuaEngineUnitTestBase.php.
References $luaDataProvider, and getEngine().
Referenced by testLua().
|
static |
Reimplemented in Scribunto_LuaSandboxTest, and Scribunto_LuaStandaloneTest.
Definition at line 56 of file LuaEngineUnitTestBase.php.
References makeSuite().
|
protected |
Reimplemented in Scribunto_LuaUstringLibraryTest.
Definition at line 60 of file LuaEngineUnitTestBase.php.
Scribunto_LuaEngineUnitTestBase::testLua | ( | $key, | |
$testName, | |||
$expected | |||
) |
@dataProvider provideLuaData
string | $key | |
string | $testName | |
mixed | $expected |
Definition at line 101 of file LuaEngineUnitTestBase.php.
References Scribunto_LuaError\getLuaMessage(), and provideLuaData().
Scribunto_LuaEngineUnitTestBase::toString | ( | ) |
Definition at line 72 of file LuaEngineUnitTestBase.php.
References $luaTestName.
|
staticprotected |
Class to use for the data provider.
Definition at line 38 of file LuaEngineUnitTestBase.php.
|
private |
Definition at line 19 of file LuaEngineUnitTestBase.php.
Referenced by Scribunto_LuaSandboxTest\testArgumentParsingTime(), and Scribunto_LuaLanguageLibraryTest\testFormatDateTTLs().
|
private |
Definition at line 18 of file LuaEngineUnitTestBase.php.
Referenced by Scribunto_LuaTextLibraryTest\__construct(), Scribunto_LuaLanguageLibraryTest\__construct(), and __construct().
|
private |
Definition at line 20 of file LuaEngineUnitTestBase.php.
Referenced by provideLuaData().
|
protected |
Name to display instead of the default.
Definition at line 26 of file LuaEngineUnitTestBase.php.
Referenced by toString().
|
staticprotected |
Name of the module being tested.
Definition at line 32 of file LuaEngineUnitTestBase.php.
|
protected |
Tests to skip.
Associative array mapping test name to skip reason.
Definition at line 44 of file LuaEngineUnitTestBase.php.
|
staticprivate |
Definition at line 17 of file LuaEngineUnitTestBase.php.
Referenced by __construct().