Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/382022 )
Change subject: resourceloader: Add unit test for ClientHtml::makeLoad
sync=>true
......................................................................
resourceloader: Add unit test for ClientHtml::makeLoad sync=>true
Used by Special:JavaScriptTest, and we may need to use this
in OutputPage as well (for html5shiv).
Change-Id: If7d7c12056dc3aab78486050f0798d42b158d9a9
---
M tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/22/382022/1
diff --git
a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
index eaae9dc..f75d67d 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
@@ -276,6 +276,12 @@
'output' => '<script async=""
src="/w/load.php?debug=false&lang=nl&modules=test.scripts.raw&only=scripts&skin=fallback"></script>',
],
[
+ 'context' => [ 'sync' => true ],
+ 'modules' => [ 'test.scripts.raw' ],
+ 'only' => ResourceLoaderModule::TYPE_SCRIPTS,
+ 'output' => '<script
src="/w/load.php?debug=false&lang=nl&modules=test.scripts.raw&only=scripts&skin=fallback&sync=1"></script>',
+ ],
+ [
'context' => [],
'modules' => [ 'test.scripts.user' ],
'only' => ResourceLoaderModule::TYPE_SCRIPTS,
@@ -360,7 +366,7 @@
public function testMakeLoad( array $extraQuery, array $modules, $type,
$expected ) {
$context = self::makeContext( $extraQuery );
$context->getResourceLoader()->register(
self::makeSampleModules() );
- $actual = ResourceLoaderClientHtml::makeLoad( $context,
$modules, $type );
+ $actual = ResourceLoaderClientHtml::makeLoad( $context,
$modules, $type, $extraQuery );
$expected = self::expandVariables( $expected );
$this->assertEquals( $expected, (string)$actual );
}
--
To view, visit https://gerrit.wikimedia.org/r/382022
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If7d7c12056dc3aab78486050f0798d42b158d9a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits