本文整理汇总了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();
}