/**
  * @covers Robo47_Application_Resource_Autoloader::_setupAutoloader
  */
 public function testInitWithoutPrefix()
 {
     $options = array('classname' => 'Robo47_Loader_Autoloader_HtmlPurifier');
     $resource = new Robo47_Application_Resource_Autoloader($options);
     try {
         $resource->init();
         $this->fail('No exception thrown on missing prefix');
     } catch (Robo47_Application_Resource_Exception $e) {
         $this->assertEquals('Autoloader config doesn\'t contain prefix', $e->getMessage());
     }
 }
 public function init()
 {
     if (!empty($this->_options)) {
         foreach ($this->_options as $name => $opts) {
             $resource = new Robo47_Application_Resource_Autoloader($opts);
             $resource->init();
             $this->_autoloaders[$name] = $resource->getAutoloader();
         }
     } else {
         $message = 'Empty options in resource ' . 'Robo47_Application_Resource_AutoloaderMulti.';
         throw new Robo47_Application_Resource_Exception($message);
     }
 }