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