jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



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&amp;lang=nl&amp;modules=test.scripts.raw&amp;only=scripts&amp;skin=fallback"></script>',
                        ],
                        [
+                               'context' => [ 'sync' => true ],
+                               'modules' => [ 'test.scripts.raw' ],
+                               'only' => ResourceLoaderModule::TYPE_SCRIPTS,
+                               'output' => '<script 
src="/w/load.php?debug=false&amp;lang=nl&amp;modules=test.scripts.raw&amp;only=scripts&amp;skin=fallback&amp;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: merged
Gerrit-Change-Id: If7d7c12056dc3aab78486050f0798d42b158d9a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to