Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / tests / phpunit / includes / resourceloader / ResourceLoaderStartUpModuleTest.php
index 6983704..810d1fe 100644 (file)
@@ -561,4 +561,32 @@ mw.loader.register( [
                );
        }
 
+       /**
+        * @covers ResourceLoaderStartupModule::getDefinitionSummary
+        */
+       public function testGetVersionHash_varyConfig() {
+               $context = $this->getResourceLoaderContext();
+
+               $this->setMwGlobals( 'wgArticlePath', '/w1' );
+               $module = new ResourceLoaderStartupModule();
+               $version1 = $module->getVersionHash( $context );
+               $module = new ResourceLoaderStartupModule();
+               $version2 = $module->getVersionHash( $context );
+               $this->setMwGlobals( 'wgArticlePath', '/w3' );
+               $module = new ResourceLoaderStartupModule();
+               $version3 = $module->getVersionHash( $context );
+
+               $this->assertEquals(
+                       $version1,
+                       $version2,
+                       'Deterministic version hash'
+               );
+
+               $this->assertNotEquals(
+                       $version1,
+                       $version3,
+                       'Config change impacts version hash'
+               );
+       }
+
 }