X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fqunit%2Fdata%2Fload.mock.php;h=ee729e608f6945eaa6f18d9cf03b1efda9609456;hb=0f787e74f6e66a16ef4bc23937ee7ec647f4ab8b;hp=1c189703eead3087536b6a3b13ec5b3d18719025;hpb=9e762fd04b4efbf36d831947198007ab7266bbef;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/qunit/data/load.mock.php b/tests/qunit/data/load.mock.php index 1c189703ee..ee729e608f 100644 --- a/tests/qunit/data/load.mock.php +++ b/tests/qunit/data/load.mock.php @@ -24,20 +24,36 @@ */ header( 'Content-Type: text/javascript; charset=utf-8' ); -require_once '../../../includes/Xml.php'; +require_once __DIR__ . '/../../../includes/json/FormatJson.php'; +require_once __DIR__ . '/../../../includes/Xml.php'; $moduleImplementations = array( 'testUsesMissing' => " mw.loader.implement( 'testUsesMissing', function () { - QUnit.ok( false, 'Module test.usesMissing script should not run.'); + 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.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 () {}, {}, {}); ", ); @@ -50,7 +66,7 @@ if ( isset( $_GET['modules'] ) ) { if ( isset( $moduleImplementations[$module] ) ) { $response .= $moduleImplementations[$module]; } else { - $response .= Xml::encodeJsCall( 'mw.loader.state', array( $module, 'missing' ) ); + $response .= Xml::encodeJsCall( 'mw.loader.state', array( $module, 'missing' ), true ); } } }