From b6dd3b8f614886f4f017b2eb70544876211bf3ec Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 5 Mar 2018 14:41:29 -0800 Subject: [PATCH] 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 --- .../includes/resourceloader/ResourceLoaderClientHtmlTest.php | 3 +++ 1 file changed, 3 insertions(+) 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' => [ -- 2.20.1