function testNoInResponseTo() { $doc = new \DOMDocument(); $doc->load(__DIR__ . '/../../../../../../../resources/sample/Response/response02.xml'); $response = new Response(); $response->loadFromXml($doc->firstChild); $this->assertNull($response->getInResponseTo()); }
protected function validateState(Response $response) { if ($response->getInResponseTo()) { $requestState = $this->requestStore->get($response->getInResponseTo()); if (!$requestState) { throw new \RuntimeException('Got response to a request that was not made'); } if ($requestState->getDestination() != $response->getIssuer()) { throw new \RuntimeException('Got response from different issuer'); } $this->requestStore->remove($requestState); } }