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)); } }
public function validate(Response $response, Result $result) { if (!$response->isSuccess()) { $result->addError($this->buildMessage($response->getStatus())); } }