Go to the documentation of this file.
2 require_once __DIR__ .
'/NewParserTest.php';
54 if ( is_string(
$flags ) ) {
59 $mwTestDir =
$IP .
'/tests/';
61 # Human friendly helpers
65 # Will hold the .txt parser test files we will include
66 $filesToTest =
array();
68 # Filter out .txt files
69 foreach ( $wgParserTestFiles
as $parserTestFile ) {
70 $isCore = ( 0 === strpos( $parserTestFile, $mwTestDir ) );
72 if ( $isCore && $wantsCore ) {
73 self::debug(
"included core parser tests: $parserTestFile" );
74 $filesToTest[] = $parserTestFile;
75 } elseif ( !$isCore && $wantsRest ) {
76 self::debug(
"included non core parser tests: $parserTestFile" );
77 $filesToTest[] = $parserTestFile;
79 self::debug(
"skipped parser tests: $parserTestFile" );
83 . implode(
' ', $filesToTest ) );
85 $suite =
new PHPUnit_Framework_TestSuite;
86 foreach ( $filesToTest
as $fileName ) {
87 $testsName = basename( $fileName,
'.txt' );
88 $escapedFileName = strtr( $fileName,
array(
"'" =>
"\\'",
'\\' =>
'\\\\' ) );
93 $parserTestClassName = str_replace(
'.',
'_', ucfirst( $testsName ) );
94 $parserTestClassDefinition = <<<EOT
101 class $parserTestClassName
extends NewParserTest {
102 protected \$file =
'$escapedFileName';
106 eval( $parserTestClassDefinition );
107 self::debug(
"Adding test class $parserTestClassName" );
108 $suite->addTestSuite( $parserTestClassName );
117 protected static function debug( $msg ) {
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
const NO_CORE
Include non core files as set in $wgParserTestFiles.
wfDebugLog( $logGroup, $text, $dest='all')
Send a line to a supplementary debug log file, if configured, or main debug log if not.
it s the revision text itself In either if gzip is the revision text is gzipped $flags
const CORE_ONLY
Include files shipped with MediaWiki core.
const WITH_ALL
Include anything set via $wgParserTestFiles.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
wfGetCaller( $level=2)
Get the name of the function which called this function wfGetCaller( 1 ) is the function with the wfG...