Beispiel #1
0
 public function testCanRequireUnregisteredAmdModules()
 {
     $amdConfig = new Elgg_AmdConfig();
     $amdConfig->addDependency('jquery');
     $configArray = $amdConfig->getConfig();
     $this->assertEquals(array('jquery'), $configArray['deps']);
 }
Beispiel #2
0
 /**
  * AMD Config factory
  * 
  * @param Elgg_Di_ServiceProvider $c Dependency injection container
  * @return Elgg_AmdConfig
  */
 protected function getAmdConfig(Elgg_Di_ServiceProvider $c)
 {
     $obj = new Elgg_AmdConfig();
     $obj->setBaseUrl(_elgg_get_simplecache_root() . "js/");
     return $obj;
 }