DatabaseMssql: Don't duplicate body of makeList()
[lhc/web/wiklou.git] / tests / phpunit / includes / resourceloader / ResourceLoaderStartupModuleTest.php
index a189387..69854d5 100644 (file)
@@ -23,7 +23,7 @@ mw.loader.addSource( {
 } );mw.loader.register( [
     [
         "test.blank",
-        "1388534400"
+        1388534400
     ]
 ] );',
                        ) ),
@@ -40,17 +40,17 @@ mw.loader.addSource( {
 } );mw.loader.register( [
     [
         "test.blank",
-        "1388534400"
+        1388534400
     ],
     [
         "test.group.foo",
-        "1388534400",
+        1388534400,
         [],
         "x-foo"
     ],
     [
         "test.group.bar",
-        "1388534400",
+        1388534400,
         [],
         "x-bar"
     ]
@@ -68,7 +68,7 @@ mw.loader.addSource( {
 } );mw.loader.register( [
     [
         "test.blank",
-        "1388534400"
+        1388534400
     ]
 ] );'
                        ) ),
@@ -90,7 +90,7 @@ mw.loader.addSource( {
 } );mw.loader.register( [
     [
         "test.blank",
-        "1388534400",
+        1388534400,
         [],
         null,
         "example"
@@ -115,8 +115,8 @@ mw.loader.addSource( {
                                        'test.z.foo' => new ResourceLoaderTestModule( array(
                                                'dependencies' => array(
                                                        'test.x.core',
-                                                       'test.x.polyfil',
-                                                       'test.y.polyfil',
+                                                       'test.x.polyfill',
+                                                       'test.y.polyfill',
                                                ),
                                        ) ),
                                ),
@@ -126,31 +126,31 @@ mw.loader.addSource( {
 } );mw.loader.register( [
     [
         "test.x.core",
-        "1388534400"
+        1388534400
     ],
     [
         "test.x.polyfill",
-        "1388534400",
+        1388534400,
         [],
         null,
-        "local",
+        null,
         "return true;"
     ],
     [
         "test.y.polyfill",
-        "1388534400",
+        1388534400,
         [],
         null,
-        "local",
+        null,
         "return !!(    window.JSON \u0026\u0026    JSON.parse \u0026\u0026    JSON.stringify);"
     ],
     [
         "test.z.foo",
-        "1388534400",
+        1388534400,
         [
-            "test.x.core",
-            "test.x.polyfil",
-            "test.y.polyfil"
+            0,
+            1,
+            2
         ]
     ]
 ] );',
@@ -222,63 +222,63 @@ mw.loader.addSource( {
 } );mw.loader.register( [
     [
         "test.blank",
-        "1388534400"
+        1388534400
     ],
     [
         "test.x.core",
-        "1388534400"
+        1388534400
     ],
     [
         "test.x.util",
-        "1388534400",
+        1388534400,
         [
-            "test.x.core"
+            1
         ]
     ],
     [
         "test.x.foo",
-        "1388534400",
+        1388534400,
         [
-            "test.x.core"
+            1
         ]
     ],
     [
         "test.x.bar",
-        "1388534400",
+        1388534400,
         [
-            "test.x.util"
+            2
         ]
     ],
     [
         "test.x.quux",
-        "1388534400",
+        1388534400,
         [
-            "test.x.foo",
-            "test.x.bar",
+            3,
+            4,
             "test.x.unknown"
         ]
     ],
     [
         "test.group.foo.1",
-        "1388534400",
+        1388534400,
         [],
         "x-foo"
     ],
     [
         "test.group.foo.2",
-        "1388534400",
+        1388534400,
         [],
         "x-foo"
     ],
     [
         "test.group.bar.1",
-        "1388534400",
+        1388534400,
         [],
         "x-bar"
     ],
     [
         "test.group.bar.2",
-        "1388534400",
+        1388534400,
         [],
         "x-bar",
         "example"
@@ -290,7 +290,7 @@ mw.loader.addSource( {
 
        /**
         * @dataProvider provideGetModuleRegistrations
-        * @covers ResourceLoaderStartupModule::optimizeDependencies
+        * @covers ResourceLoaderStartupModule::compileUnresolvedDependencies
         * @covers ResourceLoaderStartUpModule::getModuleRegistrations
         * @covers ResourceLoader::makeLoaderSourcesScript
         * @covers ResourceLoader::makeLoaderRegisterScript
@@ -300,7 +300,7 @@ mw.loader.addSource( {
                        $this->setMwGlobals( 'wgResourceLoaderSources', $case['sources'] );
                }
 
-               $context = self::getResourceLoaderContext();
+               $context = $this->getResourceLoaderContext();
                $rl = $context->getResourceLoader();
 
                $rl->register( $case['modules'] );
@@ -337,15 +337,15 @@ mw.loader.addSource( {
        public function testRegistrationsMinified( $modules ) {
                $this->setMwGlobals( 'wgResourceLoaderDebug', false );
 
-               $context = self::getResourceLoaderContext();
+               $context = $this->getResourceLoaderContext();
                $rl = $context->getResourceLoader();
                $rl->register( $modules );
                $module = new ResourceLoaderStartUpModule();
                $this->assertEquals(
 'mw.loader.addSource({"local":"/w/load.php"});'
 . 'mw.loader.register(['
-. '["test.blank","1388534400"],'
-. '["test.min","1388534400",["test.blank"],null,"local",'
+. '["test.blank",1388534400],'
+. '["test.min",1388534400,[0],null,null,'
 . '"return!!(window.JSON\u0026\u0026JSON.parse\u0026\u0026JSON.stringify);"'
 . ']]);',
                        $module->getModuleRegistrations( $context ),
@@ -357,7 +357,7 @@ mw.loader.addSource( {
         * @dataProvider provideRegistrations
         */
        public function testRegistrationsUnminified( $modules ) {
-               $context = self::getResourceLoaderContext();
+               $context = $this->getResourceLoaderContext();
                $rl = $context->getResourceLoader();
                $rl->register( $modules );
                $module = new ResourceLoaderStartUpModule();
@@ -367,16 +367,16 @@ mw.loader.addSource( {
 } );mw.loader.register( [
     [
         "test.blank",
-        "1388534400"
+        1388534400
     ],
     [
         "test.min",
-        "1388534400",
+        1388534400,
         [
-            "test.blank"
+            0
         ],
         null,
-        "local",
+        null,
         "return !!(    window.JSON \u0026\u0026    JSON.parse \u0026\u0026    JSON.stringify);"
     ]
 ] );',