コード例 #1
0
ファイル: PluginLoaderTest.php プロジェクト: omusico/logica
 /**
  * @group ZF-9721
  */
 public function testRemovePrefixPathThrowsExceptionIfPathNotRegisteredInPrefix()
 {
     try {
         $loader = new Zend_Loader_PluginLoader(array('My_Namespace_' => 'My/Namespace/'));
         $loader->removePrefixPath('My_Namespace_', 'ZF9721');
         $this->fail();
     } catch (Exception $e) {
         $this->assertType('Zend_Loader_PluginLoader_Exception', $e);
         $this->assertContains('Prefix My_Namespace_ / Path ZF9721', $e->getMessage());
     }
     $this->assertEquals(1, count($loader->getPaths('My_Namespace_')));
 }
コード例 #2
0
ファイル: PluginLoaderTest.php プロジェクト: travisj/zf
 public function testRemovePrefixPathThrowsExceptionIfPrefixPathPairNotRegistered()
 {
     $loader = new Zend_Loader_PluginLoader();
     $loader->addPrefixPath('Foo_Bar', realpath(dirname(__FILE__)));
     $paths = $loader->getPaths();
     $this->assertTrue(isset($paths['Foo_Bar_']));
     try {
         $loader->removePrefixPath('Foo_Bar', $this->libPath);
         $this->fail('Removing non-existent prefix/path pair should throw an exception');
     } catch (Exception $e) {
     }
 }