/** * Asserts that <em>no</em> association is present for the given <code>associationKey</code> and * <code>associationValue</code>. * * @param string $associationKey The key of the association * @param string $associationValue The value of the association * @throws GovernorAssertionError */ public function assertNoAssociationPresent($associationKey, $associationValue) { $associatedSagas = $this->sagaRepository->find($this->sagaType, new AssociationValue($associationKey, $associationValue)); if (!empty($associatedSagas)) { throw new GovernorAssertionError(sprintf("Expected a saga to be associated with key:<%s> value:<%s>, but found <%s>", $associationKey, $associationValue)); } }
private function repositoryContents($lookupValue, $sagaType) { $identifiers = $this->sagaRepository->find($sagaType, new AssociationValue("myIdentifier", $lookupValue)); $sagas = array(); foreach ($identifiers as $identifier) { $sagas[] = $this->sagaRepository->load($identifier); } return $sagas; }