示例#1
0
 /**
  * Checks whether request matches response.
  *
  * @param \Josser\Client\Request\RequestInterface $request
  * @param \Josser\Client\Response\ResponseInterface $response
  * @return boolean
  */
 public function match(RequestInterface $request, ResponseInterface $response)
 {
     return (bool) ($request->getId() == $response->getId());
 }
 public function __construct(RequestInterface $request, ResponseInterface $response)
 {
     $error = sprintf('Response id (%s) does not match request id (%s).', (string) $response->getId(), (string) $request->getId());
     parent::__construct($error);
 }