예제 #1
0
 /**
  * action show
  *
  * @return void
  */
 public function showAction()
 {
     $answerRecordUidFromSetup = $this->settings['theAnswerUid'];
     $answer = $this->answerRepository->findByUid($answerRecordUidFromSetup);
     $theAnswer = $this->calculateAnswer($answer->getValue());
     $this->view->assign('theAnswer', $theAnswer);
 }
예제 #2
0
 /**
  * Returns dummy answer
  *
  * @return Tx_JhTheanswer_Domain_Model_Answer $answer
  * @author Jürg Hunziker <*****@*****.**>
  */
 public function mockAnswerRepositoryFindByUid()
 {
     $answer = $this->objectManager->get('Tx_JhTheanswer_Domain_Model_Answer');
     $answer->setValue(32);
     $this->answerRepository->expects($this->once())->method('findByUid')->will($this->returnValue($answer));
     return $answer;
 }