/** * @test */ public function findByUidsReturnsCorrectCountForString() { $uidArray = array(); $uidArray[]=$this->testDatabase>createRecord('tx_powermail_domain_model_forms',array()); $uidArray[]=$this->testDatabase>createRecord('tx_powermail_domain_model_forms',array()); $uidArray[]=$this->testDatabase>createRecord('tx_powermail_domain_model_forms',array()); $uidArray[]=$this->testDatabase>createRecord('tx_powermail_domain_model_forms',array()); $uidArray[]=$this->testDatabase>createRecord('tx_powermail_domain_model_forms',array()); $this->assertSame(5,$this->fixture->findByUids(implode(',',$uidArray))->count()); }
/** * action show form for creating new mails * * @return void */ public function formAction() { if (!isset($this->settings['main']['form']) || !$this->settings['main']['form']) { return; } // get forms $forms = $this->formsRepository->findByUids($this->settings['main']['form']); $this->signalSlotDispatcher->dispatch(__CLASS__, __FUNCTION__ . 'BeforeRenderView', array($forms, $this)); $this->view->assign('forms', $forms); $this->view->assign('messageClass', $this->messageClass); $this->view->assign('action', ($this->settings['main']['confirmation'] ? 'confirmation' : 'create')); // open session if (method_exists($forms->getFirst(), 'getUid')) { Tx_Powermail_Utility_Div::saveFormStartInSession($forms->getFirst()->getUid()); } }