public function validate(SubjectConfirmation $subjectConfirmation, Result $result)
 {
     $recipient = $subjectConfirmation->SubjectConfirmationData->Recipient;
     if ($recipient && !$this->destination->equals(new Destination($recipient))) {
         $result->addError(sprintf('Recipient in SubjectConfirmationData ("%s") does not match the current destination ("%s")', $recipient, $this->destination));
     }
 }
Exemplo n.º 2
0
 public function validate(Response $response, Result $result)
 {
     $destination = $response->getDestination();
     if (!$this->expectedDestination->equals(new Destination($destination))) {
         $result->addError(sprintf('Destination in response "%s" does not match the expected destination "%s"', $destination, $this->expectedDestination));
     }
 }