本文整理匯總了PHP中Zend_Test_PHPUnit_ControllerTestCase::dispatch方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Test_PHPUnit_ControllerTestCase::dispatch方法的具體用法?PHP Zend_Test_PHPUnit_ControllerTestCase::dispatch怎麽用?PHP Zend_Test_PHPUnit_ControllerTestCase::dispatch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Test_PHPUnit_ControllerTestCase
的用法示例。
在下文中一共展示了Zend_Test_PHPUnit_ControllerTestCase::dispatch方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dispatch
public function dispatch($url = null)
{
// removing this helper solves issues with multiple redirects in one test
// a fresh instance of helper is registered anyway
Zend_Controller_Action_HelperBroker::removeHelper('redirector');
// Zend_Controller_Action_HelperBroker::removeHelper('flashMessenger');
parent::dispatch($url);
}
示例2: dispatch
/**
* Overwritten to toss exceptions in your face, so developers don't have to inspect the
* HTML response to see what went wrong.
* We'll skip Zend_Controller_Action_Exceptions though, because they actually provide semantic
* meaning to response. For instance, you can use them to adjust the HTTP status code, which is
* actually a valid response to these exception.
* This method should throw only unexpected exceptions that need fixing right away.
*/
public function dispatch($url = null)
{
$response = parent::dispatch($url);
if (!$this->getResponse()->isException()) {
return $response;
}
foreach ($this->getResponse()->getException() as $exp) {
if (!$exp instanceof Zend_Controller_Action_Exception) {
throw $exp;
}
}
return $response;
}
示例3: dispatch
public function dispatch($url = null)
{
$this->getFrontController()->setParam('bootstrap', $this->_application->getBootstrap());
parent::dispatch($url);
}
示例4: dispatch
/**
* @internal Overrides the parent behavior to enable automatic throwing of
* exceptions from dispatching.
* @param string $url
* @param boolean $throwExceptions
* @return void
*/
public function dispatch($url = null, $throwExceptions = true)
{
parent::dispatch($url);
if ($throwExceptions) {
if (isset($this->request->error_handler)) {
throw $this->request->error_handler->exception;
}
}
}
示例5: dispatch
public function dispatch($url)
{
parent::dispatch($url);
}