From 14f74d141ab5580688bfd46d2f74c026e43ed967 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 1 Apr 2015 06:11:44 +0200 Subject: Update to MediaWiki 1.24.2 --- tests/qunit/data/load.mock.php | 74 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 tests/qunit/data/load.mock.php (limited to 'tests/qunit/data/load.mock.php') diff --git a/tests/qunit/data/load.mock.php b/tests/qunit/data/load.mock.php new file mode 100644 index 00000000..ee729e60 --- /dev/null +++ b/tests/qunit/data/load.mock.php @@ -0,0 +1,74 @@ + " +mw.loader.implement( 'testUsesMissing', function () { + QUnit.ok( false, 'Module usesMissing script should not run.' ); + QUnit.start(); +}, {}, {}); +", + + 'testUsesNestedMissing' => " +mw.loader.implement( 'testUsesNestedMissing', function () { + QUnit.ok( false, 'Module testUsesNestedMissing script should not run.' ); + QUnit.start(); +}, {}, {}); +", + + 'testSkipped' =>" +mw.loader.implement( 'testSkipped', function () { + QUnit.ok( false, 'Module testSkipped was supposed to be skipped.' ); +}, {}, {}); +", + + 'testNotSkipped' =>" +mw.loader.implement( 'testNotSkipped', function () {}, {}, {}); +", + + 'testUsesSkippable' =>" +mw.loader.implement( 'testUsesSkippable', function () {}, {}, {}); +", +); + +$response = ''; + +// Only support for non-encoded module names, full module names expected +if ( isset( $_GET['modules'] ) ) { + $modules = explode( ',', $_GET['modules'] ); + foreach ( $modules as $module ) { + if ( isset( $moduleImplementations[$module] ) ) { + $response .= $moduleImplementations[$module]; + } else { + $response .= Xml::encodeJsCall( 'mw.loader.state', array( $module, 'missing' ), true ); + } + } +} + +echo $response; -- cgit v1.2.2