dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git]
/
tests
/
parser
/
ParserTestRunner.php
diff --git
a/tests/parser/ParserTestRunner.php
b/tests/parser/ParserTestRunner.php
index
08ec9f6
..
60a5881
100644
(file)
--- a/
tests/parser/ParserTestRunner.php
+++ b/
tests/parser/ParserTestRunner.php
@@
-143,8
+143,7
@@
class ParserTestRunner {
$this->keepUploads = !empty( $options['keep-uploads'] );
$this->keepUploads = !empty( $options['keep-uploads'] );
- $this->fileBackendName = isset( $options['file-backend'] ) ?
- $options['file-backend'] : false;
+ $this->fileBackendName = $options['file-backend'] ?? false;
$this->runDisabled = !empty( $options['run-disabled'] );
$this->runParsoid = !empty( $options['run-parsoid'] );
$this->runDisabled = !empty( $options['run-disabled'] );
$this->runParsoid = !empty( $options['run-parsoid'] );
@@
-465,7
+464,7
@@
class ParserTestRunner {
if ( is_int( $name ) ) {
$value();
} else {
if ( is_int( $name ) ) {
$value();
} else {
- $saved[$name] =
isset( $GLOBALS[$name] ) ? $GLOBALS[$name] :
null;
+ $saved[$name] =
$GLOBALS[$name] ??
null;
$GLOBALS[$name] = $value;
}
}
$GLOBALS[$name] = $value;
}
}
@@
-537,7
+536,7
@@
class ParserTestRunner {
* @return bool
*/
public function isSetupDone( $funcName ) {
* @return bool
*/
public function isSetupDone( $funcName ) {
- return
isset( $this->setupDone[$funcName] ) ? $this->setupDone[$funcName] :
false;
+ return
$this->setupDone[$funcName] ??
false;
}
/**
}
/**
@@
-829,8
+828,15
@@
class ParserTestRunner {
$titleText = 'Parser test';
}
$titleText = 'Parser test';
}
+ if ( isset( $opts['maxincludesize'] ) ) {
+ $options->setMaxIncludeSize( $opts['maxincludesize'] );
+ }
+ if ( isset( $opts['maxtemplatedepth'] ) ) {
+ $options->setMaxTemplateDepth( $opts['maxtemplatedepth'] );
+ }
+
$local = isset( $opts['local'] );
$local = isset( $opts['local'] );
- $preprocessor =
isset( $opts['preprocessor'] ) ? $opts['preprocessor'] :
null;
+ $preprocessor =
$opts['preprocessor'] ??
null;
$parser = $this->getParser( $preprocessor );
$title = Title::newFromText( $titleText );
$parser = $this->getParser( $preprocessor );
$title = Title::newFromText( $titleText );
@@
-1083,6
+1089,11
@@
class ParserTestRunner {
'wgFragmentMode' => [ 'legacy' ],
];
'wgFragmentMode' => [ 'legacy' ],
];
+ $nonIncludable = self::getOptionValue( 'wgNonincludableNamespaces', $opts, false );
+ if ( $nonIncludable !== false ) {
+ $setup['wgNonincludableNamespaces'] = [ $nonIncludable ];
+ }
+
if ( $config ) {
$configLines = explode( "\n", $config );
if ( $config ) {
$configLines = explode( "\n", $config );
@@
-1270,7
+1281,7
@@
class ParserTestRunner {
// Wipe some DB query result caches on setup and teardown
$reset = function () {
// Wipe some DB query result caches on setup and teardown
$reset = function () {
-
LinkCache::singleton
()->clear();
+
MediaWikiServices::getInstance()->getLinkCache
()->clear();
// Clear the message cache
MessageCache::singleton()->clear();
// Clear the message cache
MessageCache::singleton()->clear();