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

Public Member Functions

 run (?\PHPUnit_Framework_TestResult $result=null)
 
 testMailNotification ()
 
 testGenerateDiffBodyTxt ()
 
 testSaveAssignees ()
 
 testMailAssigneesUpdatedTaskTrueOnMinorEdit ()
 
 testGetAssignedUsersFromParserOutput ()
 
 testValidCovers ()
 

Protected Member Functions

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

Detailed Description

SemanticTasksMailer semantic-tasks

GNU GPL v2+

Since
3.0

Member Function Documentation

◆ overrideMwServices()

ST\Tests\SemanticTasksMailerTest::overrideMwServices (   $configOverrides = null,
array  $services = [] 
)
protected

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()

ST\Tests\SemanticTasksMailerTest::run ( ?\PHPUnit_Framework_TestResult  $result = null)

Only needed for MW 1.31

◆ testGenerateDiffBodyTxt()

ST\Tests\SemanticTasksMailerTest::testGenerateDiffBodyTxt ( )

SemanticTasksMailer::generateDiffBodyTxt

Exceptions
ComplexityException
MWException

◆ testMailAssigneesUpdatedTaskTrueOnMinorEdit()

ST\Tests\SemanticTasksMailerTest::testMailAssigneesUpdatedTaskTrueOnMinorEdit ( )
Todo:
: add more tests or asserts

SemanticTasksMailer::mailAssigneesUpdatedTask

Exceptions
MWException

◆ testMailNotification()

ST\Tests\SemanticTasksMailerTest::testMailNotification ( )
Todo:
: expand tests

SemanticTasksMailer::mailNotification

Exceptions
ComplexityException
MWException

◆ testSaveAssignees()

ST\Tests\SemanticTasksMailerTest::testSaveAssignees ( )

◆ testValidCovers()

ST\Tests\SemanticTasksMailerTest::testValidCovers ( )
Todo:
: fix covers annotation and remove this.

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

About | General disclaimer | Privacy policy