/** * Implements process() method, forwarding the call to current * action only * @return void */ public function process() { if (is_null($this->currentAction)) { return; } if ($this->currentAction instanceof \Nethgui\Controller\RequestHandlerInterface) { $this->currentAction->process(); } }
protected function runModuleTest(\Nethgui\Module\ModuleInterface $module, ModuleTestEnvironment $env) { $platform = $this->createPlatformMock($env); $module->setPlatform($platform); $module->initialize(); if ($module instanceof \Nethgui\Controller\RequestHandlerInterface) { $request = $this->createRequestMock($env); $validationReport = $this->createValidationReportMock($env); $module->bind($request); $module->validate($validationReport); $module->process(); } $view = $this->createViewMock($module, $env); $module->prepareView($view); $platform->signalFinalEvents(); foreach ($env->getView() as $key => $value) { $this->assertEquals($value, $view[$key], "View parameter `{$key}`."); } $this->fullViewOutput = array(); // obsolete: $view->getClientEvents(); foreach ($this->dbObjectCheckList as $dbStubInfo) { $this->assertTrue($dbStubInfo[1]->getState()->isFinal(), sprintf('Database `%s` is not in final state! %s', $dbStubInfo[0], $dbStubInfo[1]->getState())); } }