/** * @test */ public function readAllRetrievesAllAnnotatedStartSagas() { $saga = new StartSagaAnnotationReaderTest_Saga(Identity::createNew(), new AssociationValues([])); $reader = new StartSagaAnnotationReader($saga); $annotations = $reader->readAll(); self::assertCount(1, $annotations); }
/** * @throws NoStartSagaHandlerException */ private function readAnnotatedStarters() { /* @var $this EventHandler|AnnotatedSaga */ $reader = new StartSagaAnnotationReader($this); $annotations = $reader->readAll(); if (empty($annotations)) { throw new NoStartSagaHandlerException($this); } /* @var $annotation StartSaga */ foreach ($annotations as $annotation) { $this->annotatedSagaStarters[] = $annotation->getMethodName(); } }