Beispiel #1
0
 /**
  * @param string $sagaType
  * @param Identity $identity
  * @param AssociationValues $associationValues
  * @return Saga
  * @throws \InvalidArgumentException
  */
 public function createSaga(string $sagaType, Identity $identity, AssociationValues $associationValues) : Saga
 {
     /* @var $saga ToDoSaga */
     $saga = parent::createSaga($sagaType, $identity, $associationValues);
     $saga->setLogger($this->logger);
     $saga->setEventScheduler($this->scheduler);
     return $saga;
 }
 /**
  * @test
  * @expectedException \InvalidArgumentException
  */
 public function createSagaThrowsExceptionIfSagaUnsupported()
 {
     $parameterResolver = new DefaultParameterResolver();
     $factory = new AnnotatedSagaFactory($parameterResolver);
     $factory->createSaga(\stdClass::class, Identity::createNew(), new AssociationValues([]));
 }