/** * Select language in first page * * @return array */ public function indexAction() { $this->checkInstall(1); $this->installForm->lang($this->getServiceLocator()->get('Config')); if ($this->getRequest()->isPost()) { $postData = $this->getRequest()->getPost()->toArray(); $this->installForm->setData($postData); if ($this->installForm->isValid()) { $session = $this->getSession(); $session['install'] = array('lang' => $this->installForm->getInputFilter()->getValue('lang')); return $this->redirect()->toRoute('install/license'); } } $this->layout()->setVariables(array('currentRoute' => $this->getRouteMatch()->getMatchedRouteName())); return array('form' => $this->installForm); }
/** * Test * * @return void */ public function testLang() { $this->assertNull($this->object->lang(Registry::get('Application')->getConfig())); }