X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fresourceloader%2FResourceLoaderClientHtmlTest.php;h=3e0d883c60a7be134abd5307c03fe8725fb4cf86;hp=528c3220e85c0e4c94a87c3998f107390dadf915;hb=5049af1048c77b1ea6ab3193688d23a48ddf8df0;hpb=e968a1f431ad058dcb14adb2757bde5664b99a79
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
index 528c3220e8..3e0d883c60 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
@@ -1,5 +1,7 @@
[ 'type' => ResourceLoaderModule::LOAD_STYLES ],
'test.styles.mixed' => [],
- 'test.styles.noscript' => [ 'group' => 'noscript', 'type' => ResourceLoaderModule::LOAD_STYLES ],
- 'test.styles.mixed.user' => [ 'group' => 'user' ],
- 'test.styles.mixed.user.empty' => [ 'group' => 'user', 'isKnownEmpty' => true ],
- 'test.styles.private' => [ 'group' => 'private', 'styles' => '.private{}' ],
+ 'test.styles.noscript' => [
+ 'type' => ResourceLoaderModule::LOAD_STYLES,
+ 'group' => 'noscript',
+ ],
+ 'test.styles.user' => [
+ 'type' => ResourceLoaderModule::LOAD_STYLES,
+ 'group' => 'user',
+ ],
+ 'test.styles.user.empty' => [
+ 'type' => ResourceLoaderModule::LOAD_STYLES,
+ 'group' => 'user',
+ 'isKnownEmpty' => true,
+ ],
+ 'test.styles.private' => [
+ 'type' => ResourceLoaderModule::LOAD_STYLES,
+ 'group' => 'private',
+ 'styles' => '.private{}',
+ ],
'test.scripts' => [],
'test.scripts.top' => [ 'position' => 'top' ],
- 'test.scripts.mixed.user' => [ 'group' => 'user' ],
- 'test.scripts.mixed.user.empty' => [ 'group' => 'user', 'isKnownEmpty' => true ],
+ 'test.scripts.user' => [ 'group' => 'user' ],
+ 'test.scripts.user.empty' => [ 'group' => 'user', 'isKnownEmpty' => true ],
'test.scripts.raw' => [ 'isRaw' => true ],
];
return array_map( function ( $options ) {
@@ -90,14 +106,14 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
] );
$client->setModuleStyles( [
'test.styles.mixed',
- 'test.styles.mixed.user.empty',
+ 'test.styles.user.empty',
'test.styles.private',
'test.styles.pure',
'test.unregistered.styles',
] );
$client->setModuleScripts( [
'test.scripts',
- 'test.scripts.mixed.user.empty',
+ 'test.scripts.user.empty',
'test.scripts.top',
'test.unregistered.scripts',
] );
@@ -107,18 +123,17 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
'test.private.top' => 'loading',
'test.private.bottom' => 'loading',
'test.styles.pure' => 'ready',
- 'test.styles.mixed.user.empty' => 'ready',
+ 'test.styles.user.empty' => 'ready',
'test.styles.private' => 'ready',
'test.scripts' => 'loading',
'test.scripts.top' => 'loading',
- 'test.scripts.mixed.user.empty' => 'ready',
+ 'test.scripts.user.empty' => 'ready',
],
'general' => [
'test',
'test.top',
],
'styles' => [
- 'test.styles.mixed',
'test.styles.pure',
],
'scripts' => [
@@ -238,16 +253,22 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
],
[
'context' => [],
- 'modules' => [ 'test.scripts.mixed.user' ],
+ 'modules' => [ 'test.scripts.user' ],
'only' => ResourceLoaderModule::TYPE_SCRIPTS,
- 'output' => '',
+ 'output' => '',
],
[
'context' => [ 'debug' => true ],
'modules' => [ 'test.styles.pure', 'test.styles.mixed' ],
'only' => ResourceLoaderModule::TYPE_STYLES,
- 'output' => '' . "\n"
- . '',
+ 'output' => '' . "\n"
+ . '',
+ ],
+ [
+ 'context' => [ 'debug' => false ],
+ 'modules' => [ 'test.styles.pure', 'test.styles.mixed' ],
+ 'only' => ResourceLoaderModule::TYPE_STYLES,
+ 'output' => '',
],
[
'context' => [],