ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
DestinationMatches.php
Go to the documentation of this file.
1 <?php
2 
4 
9 
10 class DestinationMatches implements
12 {
17 
19  {
20  $this->expectedDestination = $destination;
21  }
22 
24  {
25  $destination = $response->getDestination();
26  if (!$this->expectedDestination->equals(new Destination($destination))) {
27  $result->addError(sprintf(
28  'Destination in response "%s" does not match the expected destination "%s"',
30  $this->expectedDestination
31  ));
32  }
33  }
34 }
Simple Result object.
Definition: Result.php:10
$result
Value Object representing the current destination.
Definition: Destination.php:10
getDestination()
Retrieve the destination of this message.
Definition: Message.php:323
$response