/** * @test */ public function readAllRetrievesAllAnnotatedStartSagas() { $saga = new EndSagaAnnotationReaderTest_Saga(Identity::createNew(), new AssociationValues([])); $reader = new EndSagaAnnotationReader($saga); $annotations = $reader->readAll(); self::assertCount(1, $annotations); }
/** * @throws NoEndSagaHandlerException */ private function readAnnotatedEndings() { $reader = new EndSagaAnnotationReader($this); $annotations = $reader->readAll(); if (empty($annotations)) { throw new NoEndSagaHandlerException($this); } /* @var $annotation EndSaga */ foreach ($annotations as $annotation) { $this->annotatedSagaEndings[] = $annotation->getMethodName(); } }