/** * @param $action * @param string $method * @param array $params * @param array $post * @return Nette\Application\IResponse */ protected function runPresenterAction($action, $method = 'GET', $params = [], $post = []) { /** @var IntegrationTestCase|PresenterRunner $this */ if (!$this->presenter) { throw new \LogicException("You have to open the presenter using \$this->openPresenter(\$name); before calling actions"); } $request = new Nette\Application\Request($this->presenter->getName(), $method, ['action' => $action] + $params, $post); return $this->presenter->run($request); }
/** * Simulates request calling presenter's action * @param Nette\Application\UI\Presenter $presenter * @param string $action * @param array $args * @return Nette\Application\IResponse */ protected function callPresenterAction($presenter, $action, $args = array()) { $args['action'] = $action; $request = new Nette\Application\Request($presenter->getName(), 'GET', $args); return $presenter->run($request); }
public function run(Application\Request $request) { $this->autoCanonicalize = FALSE; return parent::run($request); }