* A new message, "api-error-filetype-banned-type", is available for formatting
API upload errors due to the file extension blacklist.
* jsMessage: Redesigned in Vector/Monobook as floating bubble with auto-hide.
+* New hook 'ParserTestGlobals' allows to set globals before running parser tests.
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
maintenance/parserTests.inc
$parser: Parser object created
+'ParserTestGlobals': Allows to define globals for parser tests.
+&$globals: Array with all the globals which should be set for parser tests.
+ The arrays keys serve as the globals names, its values are the globals values.
+
'ParserTestTables': alter the list of tables to duplicate when parser tests
are run. Use when page save hooks require the presence of custom tables
to ensure that tests continue to run properly.
$this->savedGlobals = array();
+ /** @since 1.20 */
+ wfRunHooks( 'ParserTestGlobals', array( &$settings ) );
+
foreach ( $settings as $var => $val ) {
if ( array_key_exists( $var, $GLOBALS ) ) {
$this->savedGlobals[$var] = $GLOBALS[$var];
$this->savedGlobals = array();
+ /** @since 1.20 */
+ wfRunHooks( 'ParserTestGlobals', array( &$settings ) );
+
foreach ( $settings as $var => $val ) {
if ( array_key_exists( $var, $GLOBALS ) ) {
$this->savedGlobals[$var] = $GLOBALS[$var];