/**
  * @group ZF-7550
  * @group disable
  */
 public function testRequestingPluginsByAutoloadableClassNameShouldNotRaiseFatalErrors()
 {
     // Using namesapce 'zabt' to prevent conflict with Zend namespace
     $rl = new ResourceAutoloader(array('namespace' => 'Zabt', 'basePath' => __DIR__ . '/TestAsset'));
     $rl->addResourceType('resources', 'resources', 'Resource');
     $options = array('resources' => array('Zabt\\Resource\\Autoloaded' => array('bar' => 'baz')));
     set_error_handler(array($this, 'handleError'));
     $this->application->setOptions($options);
     $bootstrap = new Application\Bootstrap($this->application);
     $bootstrap->bootstrap();
     restore_error_handler();
 }
Exemple #2
0
 /**
  * Constructor
  *
  * @param  array|\Zend\Config\Config $options
  * @return void
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->initDefaultResourceTypes();
 }
 /**
  * @group ZF-8364
  * @group ZF-6727
  */
 public function testAutoloaderResourceGetClassPathReturnFalseForPrefixedClass()
 {
     $loader = new ResourceAutoloader(array('prefix' => 'FooBar', 'basePath' => realpath(__DIR__ . '/_files/ResourceAutoloader')));
     $loader->addResourceTypes(array('model' => array('path' => 'models', 'namespace' => 'Model')));
     $path = $loader->autoload('Something_Totally_Wrong');
     $this->assertFalse($path);
 }