public function testAccessors()
 {
     $context = self::getContext();
     $derived = new DerivativeResourceLoaderContext($context);
     $this->assertSame($derived->getRequest(), $context->getRequest());
     $this->assertSame($derived->getResourceLoader(), $context->getResourceLoader());
 }
 /**
  * Get the URL or URLs to load for this module's JS in debug mode.
  * @param ResourceLoaderContext $context
  * @return array list of urls
  * @see ResourceLoaderModule::getScriptURLsForDebug
  */
 public function getScriptURLsForDebug(ResourceLoaderContext $context)
 {
     if ($this->hasHackedScriptMode) {
         $derivative = new DerivativeResourceLoaderContext($context);
         $derivative->setDebug(true);
         $derivative->setModules(array($this->getName()));
         // @todo FIXME: Make this templates and update
         // makeModuleResponse so that it only outputs template code.
         // When this is done you can merge with parent array and
         // retain file names.
         $derivative->setOnly('scripts');
         $rl = $derivative->getResourceLoader();
         $urls = array($rl->createLoaderURL($this->getSource(), $derivative));
     } else {
         $urls = parent::getScriptURLsForDebug($context);
     }
     return $urls;
 }