Пример #1
0
 /**
  * @test
  */
 function it_can_be_reconstituted_with_a_task_list()
 {
     $task1 = TaskId::generate();
     $task2 = TaskId::generate();
     $process = Process::withTaskList([$task1, $task2], ProcessId::generate(), ProcessType::linearMessaging());
     $this->assertTrue($task1->equals($process->tasks()[0]));
     $this->assertTrue($task2->equals($process->tasks()[1]));
     $this->assertTrue(ProcessType::linearMessaging()->equals($process->type()));
 }
Пример #2
0
 /**
  * @param ProcessWasAddedToWorkflow $event
  */
 protected function whenProcessWasAddedToWorkflow(ProcessWasAddedToWorkflow $event)
 {
     $this->processList[] = Process::withTaskList($event->tasks(), $event->processId(), $event->processType());
 }