/** * Get the load URL of the startup modules. * * This is a helper for getScript(), but can also be called standalone, such * as when generating an AppCache manifest. * * @param ResourceLoaderContext $context * @return string */ public static function getStartupModulesUrl(ResourceLoaderContext $context) { $rl = $context->getResourceLoader(); $derivative = new DerivativeResourceLoaderContext($context); $derivative->setModules(self::getStartupModules()); $derivative->setOnly('scripts'); // Must setModules() before makeVersionQuery() $derivative->setVersion($rl->makeVersionQuery($derivative)); return $rl->createLoaderURL('local', $derivative); }
public function testVersion() { $derived = new DerivativeResourceLoaderContext(self::getContext()); $derived->setVersion('hw1'); $this->assertEquals($derived->getVersion(), 'hw1'); }