Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | List of all members
SMW\Scribunto\Tests\ScribuntoLuaEngineTestBase Class Reference
Inheritance diagram for SMW\Scribunto\Tests\ScribuntoLuaEngineTestBase:
Inheritance graph
[legend]
Collaboration diagram for SMW\Scribunto\Tests\ScribuntoLuaEngineTestBase:
Collaboration graph
[legend]

Public Member Functions

 getScribuntoLuaLibrary ()
 
 run (\PHPUnit_Framework_TestResult $result=null)
 

Protected Member Functions

 setUp ()
 
 overrideMwServices ( $configOverrides=null, array $services=[])
 

Detailed Description

Encapsulation of the Scribunto_LuaEngineTestBase class

GNU GPL v2+

Since
1.0
Author
mwjames

Member Function Documentation

◆ getScribuntoLuaLibrary()

SMW\Scribunto\Tests\ScribuntoLuaEngineTestBase::getScribuntoLuaLibrary ( )

Accesses an instance of class {

See also
ScribuntoLuaLibrary}
Returns
ScribuntoLuaLibrary ScribuntoLuaLibrary

◆ overrideMwServices()

SMW\Scribunto\Tests\ScribuntoLuaEngineTestBase::overrideMwServices (   $configOverrides = null,
array  $services = [] 
)
protected
See also
Scribunto_LuaEngineTestBase -> MediaWikiTestCase

MediaWikiTestCase isolates the result with MediaWikiTestResult which ecapsultes the commandline args and since we need to use "real" tables as part of "use-normal-tables" we otherwise end-up with the CloneDatabase to create TEMPORARY TABLE by default as in:

CREATE TEMPORARY TABLE unittest_smw_di_blob (LIKE smw_di_blob) and because of the TEMPORARY TABLE, MySQL (not MariaDB) will complain about things like:

SELECT p.smw_title AS prop, o_id AS id0, o0.smw_title AS v0, o0.smw_namespace AS v1, o0.smw_iw AS v2, o0.smw_sortkey AS v3, o0.smw_subobject AS v4, o0.smw_sort AS v5 FROM unittest_smw_di_wikipage INNER JOIN unittest_smw_object_ids AS p ON p_id=p.smw_id INNER JOIN unittest_smw_object_ids AS o0 ON o_id=o0.smw_id WHERE (s_id='29') AND (p.smw_iw!=':smw') AND (p.smw_iw!=':smw-delete')

Function: SMW::fetchSemanticDataFromTable Error: 1137 Can't reopen table: 'p' ()

The reason is that unittest_smw_object_ids was created as TEMPORARY TABLE and p is referencing to a TEMPORARY TABLE as well which isn't allowed in MySQL.

"You cannot refer to a TEMPORARY table more than once in the same query" [0]

[0] https://dev.mysql.com/doc/refman/8.0/en/temporary-table-problems.html

◆ run()

SMW\Scribunto\Tests\ScribuntoLuaEngineTestBase::run ( \PHPUnit_Framework_TestResult  $result = null)

Only needed for MW 1.31

◆ setUp()

SMW\Scribunto\Tests\ScribuntoLuaEngineTestBase::setUp ( )
protected

PhpParamsInspection


The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy