X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fqunit%2Fdata%2Fload.mock.php;h=1525f0440ff3a450632cef5a86a911fbdbcedf54;hb=a6827329000ec584a2614a167c79616c08c21ce7;hp=2300949860cf680e3cbf3bb5b740f26019d1383c;hpb=3bae295aef6f6495dc37802f1f4f6956c9a5648c;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/qunit/data/load.mock.php b/tests/qunit/data/load.mock.php index 2300949860..1525f0440f 100644 --- a/tests/qunit/data/load.mock.php +++ b/tests/qunit/data/load.mock.php @@ -18,10 +18,12 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @package MediaWiki * @author Lupo - * @since 1.20 */ + +// This file doesn't run as part of MediaWiki +// phpcs:disable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals + header( 'Content-Type: text/javascript; charset=utf-8' ); $moduleImplementations = [ @@ -73,8 +75,8 @@ mw.loader.implement( 'testUrlOrder.b', function () {} ); $response = ''; -// Does not support the full behaviour of ResourceLoaderContext::expandModuleNames(), -// Only supports dotless module names joined by comma, +// Does not support the full behaviour of the real load.php. +// This only supports dotless module names joined by comma, // with the exception of the hardcoded cases for testUrl*. if ( isset( $_GET['modules'] ) ) { if ( $_GET['modules'] === 'testUrlInc,testUrlIncDump|testUrlInc.a,b' ) { @@ -99,7 +101,7 @@ if ( isset( $_GET['modules'] ) ) { . '} );'; } else { // Default - $response .= 'mw.loader.state(' . json_encode( $module ) . ', "missing" );' . "\n"; + $response .= 'mw.loader.state(' . json_encode( [ $module => 'missing' ] ) . ');' . "\n"; } } }