if ( is_string( $flags ) ) {
$flags = self::CORE_ONLY;
}
- global $wgParserTestFiles, $IP;
+ global $IP;
$mwTestDir = $IP . '/tests/';
$filesToTest = [];
# Filter out .txt files
- foreach ( $wgParserTestFiles as $parserTestFile ) {
+ $files = ParserTestRunner::getParserTestFiles();
+ foreach ( $files as $parserTestFile ) {
$isCore = ( 0 === strpos( $parserTestFile, $mwTestDir ) );
if ( $isCore && $wantsCore ) {
$testsName = $extensionName . '__' . basename( $fileName, '.txt' );
$parserTestClassName = ucfirst( $testsName );
- // Official spec for class names: http://php.net/manual/en/language.oop5.basic.php
+ // Official spec for class names: https://secure.php.net/manual/en/language.oop5.basic.php
// Prepend 'ParserTest_' to be paranoid about it not starting with a number
$parserTestClassName = 'ParserTest_' .
preg_replace( '/[^a-zA-Z0-9_\x7f-\xff]/', '_', $parserTestClassName );