本文整理匯總了PHP中Zend_Controller_Action_HelperBroker::getExistingHelpers方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Controller_Action_HelperBroker::getExistingHelpers方法的具體用法?PHP Zend_Controller_Action_HelperBroker::getExistingHelpers怎麽用?PHP Zend_Controller_Action_HelperBroker::getExistingHelpers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Controller_Action_HelperBroker
的用法示例。
在下文中一共展示了Zend_Controller_Action_HelperBroker::getExistingHelpers方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testActionHelpersAreResetted
/**
* Checks if the action helpers are cleaned up correctly after
* each test.
*/
public function testActionHelpersAreResetted()
{
$previousHelpers = Zend_Controller_Action_HelperBroker::getExistingHelpers();
$test = $this->createTestCase('testAddActionHelper');
$result = $test->run();
$this->assertSuccessful($result);
$currentHelpers = Zend_Controller_Action_HelperBroker::getExistingHelpers();
$this->assertEquals($previousHelpers, $currentHelpers);
}
示例2: testResetInstanceShouldResetHelperBroker
/**
* @see ZF-3145
*/
public function testResetInstanceShouldResetHelperBroker()
{
Zend_Controller_Action_HelperBroker::addHelper(new Zend_Controller_Action_Helper_ViewRenderer());
Zend_Controller_Action_HelperBroker::addHelper(new Zend_Controller_Action_Helper_Url());
$helpers = Zend_Controller_Action_HelperBroker::getExistingHelpers();
$this->assertTrue(is_array($helpers));
$this->assertFalse(empty($helpers));
$this->_controller->resetInstance();
$helpers = Zend_Controller_Action_HelperBroker::getExistingHelpers();
$this->assertTrue(is_array($helpers));
$this->assertTrue(empty($helpers));
}
示例3: testGetHelperStatically
public function testGetHelperStatically()
{
$helper = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$this->assertTrue($helper instanceof Zend_Controller_Action_Helper_ViewRenderer);
$helpers = Zend_Controller_Action_HelperBroker::getExistingHelpers();
$this->assertTrue(is_array($helpers));
$this->assertEquals(1, count($helpers));
}
示例4: storeActionHelpers
/**
* Sets up the action helpers.
*/
protected function storeActionHelpers()
{
$this->previousActionHelpers = Zend_Controller_Action_HelperBroker::getExistingHelpers();
Zend_Controller_Action_HelperBroker::resetHelpers();
}