MediaWiki  1.23.2
MediaWikiParserTest 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...

Static Public Member Functions

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

Public Attributes

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

Static Protected Member Functions

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

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.

@group Parser @group Database

Definition at line 12 of file MediaWikiParserTest.php.

Member Function Documentation

◆ debug()

static MediaWikiParserTest::debug (   $msg)
staticprotected

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

Parameters
string$msgMessage to log

Definition at line 112 of file MediaWikiParserTest.php.

References wfDebugLog(), and wfGetCaller().

Referenced by suite().

◆ suite()

static MediaWikiParserTest::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: Get a suite of various parser tests, like extensions: Get any test defined via $wgParserTestFiles:
Parameters
$flagsbitwise flag to filter out the $wgParserTestFiles that will be included. Default: MediaWikiParserTest::CORE_ONLY
Returns
PHPUnit_Framework_TestSuite

Definition at line 53 of file MediaWikiParserTest.php.

References $flags, $IP, array(), as, CORE_ONLY, debug(), global, and NO_CORE.

Referenced by ExtensionsParserTestSuite\suite().


The documentation for this class was generated from the following file:
MediaWikiParserTest\NO_CORE
const NO_CORE
Include non core files as set in $wgParserTestFiles.
Definition: MediaWikiParserTest.php:24
MediaWikiParserTest\CORE_ONLY
const CORE_ONLY
Include files shipped with MediaWiki core.
Definition: MediaWikiParserTest.php:22
MediaWikiParserTest\WITH_ALL
const WITH_ALL
Include anything set via $wgParserTestFiles.
Definition: MediaWikiParserTest.php:26
MediaWikiParserTest\suite
static suite( $flags=self::CORE_ONLY)
Get a PHPUnit test suite of parser tests.
Definition: MediaWikiParserTest.php:53