Exemplo n.º 1
0
 /**
  * @return StateInterface
  */
 protected function createState()
 {
     $template = $this->mockTemplateEngine();
     $resultManager = $this->getMockBuilder('Ortofit\\Bundle\\QuizBundle\\Diagnostic\\DiagnosticInterface')->getMock();
     $resultManager->expects($this->any())->method('loadVariants')->with([]);
     $resultManager->expects($this->any())->method('setQuiz');
     $resultManager->expects($this->any())->method('createDiagnosis');
     $resultManager->expects($this->any())->method('saveResult');
     $state = new StateResult($template);
     $state->setResultManager($resultManager);
     return $state;
 }
Exemplo n.º 2
0
 /**
  * @param object $entityData
  *
  * @return StateResult
  */
 protected function createResultState($entityData)
 {
     $state = new StateResult($this->templateEngine);
     $state->setEntityData($entityData);
     return $state;
 }