$tmpGlobals['wgFileExtensions'][] = 'svg';
$tmpGlobals['wgSVGConverter'] = 'rsvg';
$tmpGlobals['wgSVGConverters']['rsvg'] =
- '$path/rsvg-convert -w $width -h $height $input -o $output';
+ '$path/rsvg-convert -w $width -h $height -o $output $input';
if ( $GLOBALS['wgStyleDirectory'] === false ) {
$tmpGlobals['wgStyleDirectory'] = "$IP/skins";
/**
* Set up the global variables for a consistent environment for each test.
* Ideally this should replace the global configuration entirely.
+ * @param array $opts
+ * @param string $config
+ * @return RequestContext
*/
protected function setupGlobals( $opts = array(), $config = '' ) {
global $wgFileBackends;
$this->savedGlobals = array();
/** @since 1.20 */
- wfRunHooks( 'ParserTestGlobals', array( &$settings ) );
+ Hooks::run( 'ParserTestGlobals', array( &$settings ) );
$langObj = Language::factory( $lang );
$settings['wgContLang'] = $langObj;
/**
* Get an input dictionary from a set of parser test files
* @param array $filenames
+ * @return string
*/
function getFuzzInput( $filenames ) {
$dict = '';
/**
* Get a memory usage breakdown
+ * @return array
*/
function getMemoryBreakdown() {
$memStats = array();
/**
* Get a Parser object
* @param Preprocessor $preprocessor
+ * @return Parser
*/
function getParser( $preprocessor = null ) {
global $wgParserConf;
$class = $wgParserConf['class'];
$parser = new $class( array( 'preprocessorClass' => $preprocessor ) + $wgParserConf );
- wfRunHooks( 'ParserTestParser', array( &$parser ) );
+ Hooks::run( 'ParserTestParser', array( &$parser ) );
return $parser;
}
/**
* Remove last character if it is a newline
* @param string $s
+ * @return string
*/
public function removeEndingNewline( $s ) {
if ( substr( $s, -1 ) === "\n" ) {
* @param string $key Name of option val to retrieve
* @param array $opts Options array to look in
* @param mixed $default Default value returned if not found
+ * @return mixed
*/
protected static function getOptionValue( $key, $opts, $default ) {
$key = strtolower( $key );