Merge "Add 3D filetype for STL files"
[lhc/web/wiklou.git] / tests / phpunit / includes / resourceloader / ResourceLoaderClientHtmlTest.php
index d2a0724..cef4a29 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Wikimedia\TestingAccessWrapper;
+
 /**
  * @group ResourceLoader
  */
@@ -114,22 +116,22 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                                'test.scripts.mixed.user.empty' => 'ready',
                        ],
                        'general' => [
-                               'top' => [ 'test.top' ],
-                               'bottom' => [ 'test' ],
+                               'test',
+                               'test.top',
                        ],
                        'styles' => [
                                'test.styles.mixed',
                                'test.styles.pure',
                        ],
                        'scripts' => [
-                               'top' => [ 'test.scripts.top' ],
-                               'bottom' => [ 'test.scripts' ],
+                               'test.scripts',
+                               'test.scripts.top',
                        ],
                        'embed' => [
                                'styles' => [ 'test.styles.private' ],
                                'general' => [
-                                       'top' => [ 'test.private.top' ],
-                                       'bottom' => [ 'test.private.bottom' ],
+                                       'test.private.bottom',
+                                       'test.private.top',
                                ],
                        ],
                ];
@@ -202,13 +204,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                        'test.scripts',
                ] );
 
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
-               $expected = '<script>(window.RLQ=window.RLQ||[]).push(function(){'
-                       . 'mw.loader.implement("test.private.bottom@{blankVer}",function($,jQuery,require,module){},{"css":[]});'
-                       . 'mw.loader.load("/w/load.php?debug=false\u0026lang=nl\u0026modules=test.scripts\u0026only=scripts\u0026skin=fallback");'
-                       . 'mw.loader.load(["test"]);'
-                       . '});</script>';
-               // @codingStandardsIgnoreEnd
+               $expected = '';
                $expected = self::expandVariables( $expected );
 
                $this->assertEquals( $expected, $client->getBodyHtml() );
@@ -252,8 +248,14 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                                'context' => [ 'debug' => true ],
                                'modules' => [ 'test.styles.pure', 'test.styles.mixed' ],
                                'only' => ResourceLoaderModule::TYPE_STYLES,
-                               'output' => '<link rel="stylesheet" href="/w/load.php?debug=true&amp;lang=nl&amp;modules=test.styles.pure&amp;only=styles&amp;skin=fallback"/>' . "\n"
-                                       . '<link rel="stylesheet" href="/w/load.php?debug=true&amp;lang=nl&amp;modules=test.styles.mixed&amp;only=styles&amp;skin=fallback"/>',
+                               'output' => '<link rel="stylesheet" href="/w/load.php?debug=true&amp;lang=nl&amp;modules=test.styles.mixed&amp;only=styles&amp;skin=fallback"/>' . "\n"
+                                       . '<link rel="stylesheet" href="/w/load.php?debug=true&amp;lang=nl&amp;modules=test.styles.pure&amp;only=styles&amp;skin=fallback"/>',
+                       ],
+                       [
+                               'context' => [ 'debug' => false ],
+                               'modules' => [ 'test.styles.pure', 'test.styles.mixed' ],
+                               'only' => ResourceLoaderModule::TYPE_STYLES,
+                               'output' => '<link rel="stylesheet" href="/w/load.php?debug=false&amp;lang=nl&amp;modules=test.styles.mixed%2Cpure&amp;only=styles&amp;skin=fallback"/>',
                        ],
                        [
                                'context' => [],