From: Timo Tijhof Date: Mon, 5 Mar 2018 22:41:29 +0000 (-0800) Subject: resourceloader: Add test for non-empty user module in scripts-only queue X-Git-Tag: 1.31.0-rc.0~443^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=b6dd3b8f614886f4f017b2eb70544876211bf3ec;p=lhc%2Fweb%2Fwiklou.git resourceloader: Add test for non-empty user module in scripts-only queue The getData() tests did have a test case for a 'user' group module with isKnownEmpty in the script-only queue, but not yet a non-empty one. The makeLoad() tests did have both already. Arguably the makeLoad() tests are higher level and observe its behaviour already (outputting a script tag means 'loading', outputting nothing means 'ready'), but adding it to the getData() tests for consistency. Bug: T188689 Change-Id: I842febf996ba8bb0ea25b5ca3b5ac4503db87376 --- diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php index 7bfd7698ea..a75ea56879 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php @@ -127,6 +127,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase { ] ); $client->setModuleScripts( [ 'test.scripts', + 'test.scripts.user', 'test.scripts.user.empty', 'test.scripts.shouldembed', 'test.unregistered.scripts', @@ -142,6 +143,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase { 'test.styles.private' => 'ready', 'test.styles.shouldembed' => 'ready', 'test.scripts' => 'loading', + 'test.scripts.user' => 'loading', 'test.scripts.user.empty' => 'ready', 'test.scripts.shouldembed' => 'loading', ], @@ -153,6 +155,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase { ], 'scripts' => [ 'test.scripts', + 'test.scripts.user', 'test.scripts.shouldembed', ], 'embed' => [