MediaWiki REL1_32
ParserTestTopLevelSuite Class Reference

The UnitTest must be either a class that inherits from MediaWikiTestCase or a class that provides a public static suite() method which returns an PHPUnit_Framework_Test object. More...

Inheritance diagram for ParserTestTopLevelSuite:
Collaboration diagram for ParserTestTopLevelSuite:

Public Member Functions

 __construct ( $flags)
 
 setUp ()
 
 tearDown ()
 

Static Public Member Functions

static suite ( $flags=self::CORE_ONLY)
 Get a PHPUnit test suite of parser tests.
 

Public Attributes

const CORE_ONLY = 1
 Include files shipped with MediaWiki core.
 
const NO_CORE = 2
 Include non core files as set in $wgParserTestFiles.
 
const WITH_ALL = self::CORE_ONLY | self::NO_CORE
 Include anything set via $wgParserTestFiles.
 

Static Protected Member Functions

static debug ( $msg)
 Write $msg under log group 'tests-parser'.
 

Private Attributes

 $oldTablePrefix = ''
 
ParserTestRunner $ptRunner
 
ScopedCallback $ptTeardownScope
 

Detailed Description

The UnitTest must be either a class that inherits from MediaWikiTestCase or a class that provides a public static suite() method which returns an PHPUnit_Framework_Test object.

Parser ParserTests Database

Definition at line 14 of file ParserTestTopLevelSuite.php.

Constructor & Destructor Documentation

◆ __construct()

ParserTestTopLevelSuite::__construct (   $flags)

Member Function Documentation

◆ debug()

static ParserTestTopLevelSuite::debug (   $msg)
staticprotected

Write $msg under log group 'tests-parser'.

Parameters
string$msgMessage to log

Definition at line 173 of file ParserTestTopLevelSuite.php.

References wfDebugLog(), and wfGetCaller().

Referenced by __construct().

◆ setUp()

ParserTestTopLevelSuite::setUp ( )

◆ suite()

static ParserTestTopLevelSuite::suite (   $flags = self::CORE_ONLY)
static

Get a PHPUnit test suite of parser tests.

Optionally filtered with $flags.

Examples:
Get a suite of parser tests shipped by MediaWiki core:
static suite( $flags=self::CORE_ONLY)
Get a PHPUnit test suite of parser tests.
const CORE_ONLY
Include files shipped with MediaWiki core.
Get a suite of various parser tests, like extensions:
const NO_CORE
Include non core files as set in $wgParserTestFiles.
Get any test defined via $wgParserTestFiles:
Parameters
int$flagsBitwise flag to filter out the $wgParserTestFiles that will be included. Default: ParserTestTopLevelSuite::CORE_ONLY
Returns
PHPUnit_Framework_TestSuite

Definition at line 62 of file ParserTestTopLevelSuite.php.

Referenced by CoreParserTestSuite\suite(), and ExtensionsParserTestSuite\suite().

◆ tearDown()

ParserTestTopLevelSuite::tearDown ( )

Definition at line 161 of file ParserTestTopLevelSuite.php.

References CloneDatabase\changePrefix(), and wfDebug().

Member Data Documentation

◆ $oldTablePrefix

ParserTestTopLevelSuite::$oldTablePrefix = ''
private

Definition at line 21 of file ParserTestTopLevelSuite.php.

◆ $ptRunner

ParserTestRunner ParserTestTopLevelSuite::$ptRunner
private

Definition at line 16 of file ParserTestTopLevelSuite.php.

◆ $ptTeardownScope

ScopedCallback ParserTestTopLevelSuite::$ptTeardownScope
private

Definition at line 19 of file ParserTestTopLevelSuite.php.


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