dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Move section ID fallbacks into headers themselves"
[lhc/web/wiklou.git]
/
tests
/
qunit
/
data
/
load.mock.php
diff --git
a/tests/qunit/data/load.mock.php
b/tests/qunit/data/load.mock.php
index
f6eff77
..
671bdf1
100644
(file)
--- a/
tests/qunit/data/load.mock.php
+++ b/
tests/qunit/data/load.mock.php
@@
-27,20
+27,35
@@
header( 'Content-Type: text/javascript; charset=utf-8' );
require_once __DIR__ . '/../../../includes/json/FormatJson.php';
require_once __DIR__ . '/../../../includes/Xml.php';
require_once __DIR__ . '/../../../includes/json/FormatJson.php';
require_once __DIR__ . '/../../../includes/Xml.php';
-$moduleImplementations =
array(
+$moduleImplementations =
[
'testUsesMissing' => "
mw.loader.implement( 'testUsesMissing', function () {
'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.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 () {}, {}, {});
+",
+];
$response = '';
$response = '';
@@
-51,7
+66,7
@@
if ( isset( $_GET['modules'] ) ) {
if ( isset( $moduleImplementations[$module] ) ) {
$response .= $moduleImplementations[$module];
} else {
if ( isset( $moduleImplementations[$module] ) ) {
$response .= $moduleImplementations[$module];
} else {
- $response .= Xml::encodeJsCall( 'mw.loader.state',
array( $module, 'missing' )
, true );
+ $response .= Xml::encodeJsCall( 'mw.loader.state',
[ $module, 'missing' ]
, true );
}
}
}
}
}
}