本文整理匯總了PHP中Zend_Loader_PluginLoader::removePrefixPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Loader_PluginLoader::removePrefixPath方法的具體用法?PHP Zend_Loader_PluginLoader::removePrefixPath怎麽用?PHP Zend_Loader_PluginLoader::removePrefixPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Loader_PluginLoader
的用法示例。
在下文中一共展示了Zend_Loader_PluginLoader::removePrefixPath方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testRemovePrefixPathThrowsExceptionIfPathNotRegisteredInPrefix
/**
* @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: testRemovePrefixPathThrowsExceptionIfPrefixPathPairNotRegistered
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) {
}
}