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 "Remove wrong type from @param of Language::viewPrevNext"
[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
7ff392a
..
ee729e6
100644
(file)
--- 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' );
*/
header( 'Content-Type: text/javascript; charset=utf-8' );
+require_once __DIR__ . '/../../../includes/json/FormatJson.php';
require_once __DIR__ . '/../../../includes/Xml.php';
$moduleImplementations = array(
'testUsesMissing' => "
mw.loader.implement( 'testUsesMissing', function () {
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.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 {
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
);
}
}
}
}
}
}