MediaWiki REL1_34
|
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 | |
toString () | |
Static Public Member Functions | |
static | suite ( $className) |
Protected Member Functions | |
getTestModules () | |
getTestTitle () | |
Get the title used for unit tests. | |
tearDown () | |
Protected Attributes | |
string | $luaTestName = null |
Name to display instead of the default. | |
array | $skipTests = [] |
Tests to skip. | |
Static Protected Attributes | |
static string | $dataProviderClass = 'Scribunto_LuaDataProvider' |
Class to use for the data provider. | |
static string | $moduleName = null |
Name of the module being tested. | |
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 LuaEngineTestBase.php.
Scribunto_LuaEngineTestBase::__construct | ( | $name = null, | |
array | $data = [], | ||
$dataName = '', | |||
$engineName = null ) |
Definition at line 44 of file LuaEngineTestBase.php.
References $engineName, and $staticEngineName.
|
protected |
Reimplemented in Scribunto_LuaCommonTest, Scribunto_LuaTitleLibraryTest, and Scribunto_LuaUriLibraryTest.
Definition at line 88 of file LuaEngineTestBase.php.
|
protected |
Get the title used for unit tests.
Definition at line 75 of file LuaEngineTestBase.php.
Scribunto_LuaEngineTestBase::provideLuaData | ( | ) |
Definition at line 94 of file LuaEngineTestBase.php.
References $luaDataProvider, and getEngine().
Referenced by testLua().
|
static |
Reimplemented in Scribunto_LuaTitleLibraryTest.
Definition at line 54 of file LuaEngineTestBase.php.
References makeSuite().
|
protected |
Reimplemented in Scribunto_LuaTitleLibraryTest.
Definition at line 58 of file LuaEngineTestBase.php.
Scribunto_LuaEngineTestBase::testLua | ( | $key, | |
$testName, | |||
$expected ) |
@dataProvider provideLuaData
string | $key | |
string | $testName | |
mixed | $expected |
Definition at line 108 of file LuaEngineTestBase.php.
References Scribunto_LuaError\getLuaMessage(), and provideLuaData().
Scribunto_LuaEngineTestBase::toString | ( | ) |
Definition at line 79 of file LuaEngineTestBase.php.
References $luaTestName.
|
staticprotected |
Class to use for the data provider.
Definition at line 36 of file LuaEngineTestBase.php.
|
private |
Definition at line 17 of file LuaEngineTestBase.php.
Referenced by Scribunto_LuaCommonTest\setUp(), Scribunto_LuaTitleLibraryTest\testAddsLinks(), Scribunto_LuaCommonTest\testBug62291(), Scribunto_LuaCommonTest\testCallParserFunction(), Scribunto_LuaCommonTest\testFrames(), Scribunto_LuaCommonTest\testGetCurrentFrameAndMWLoadData(), Scribunto_LuaCommonTest\testGetCurrentFrameAtModuleScope(), Scribunto_LuaCommonTest\testLoadDataLoadedOnce(), Scribunto_LuaCommonTest\testModuleStringExtend(), Scribunto_LuaCommonTest\testNonUtf8Errors(), Scribunto_LuaCommonTest\testOsDateTimeTTLs(), Scribunto_LuaCommonTest\testPHPLibrary(), and Scribunto_LuaCommonTest\testVolatileCaching().
|
private |
Definition at line 16 of file LuaEngineTestBase.php.
Referenced by __construct().
|
private |
Definition at line 18 of file LuaEngineTestBase.php.
Referenced by provideLuaData().
|
protected |
Name to display instead of the default.
Definition at line 24 of file LuaEngineTestBase.php.
Referenced by toString().
|
staticprotected |
Name of the module being tested.
Definition at line 30 of file LuaEngineTestBase.php.
|
protected |
Tests to skip.
Associative array mapping test name to skip reason.
Definition at line 42 of file LuaEngineTestBase.php.
|
staticprivate |
Definition at line 15 of file LuaEngineTestBase.php.
Referenced by __construct().