forward-port of relative quota amount of personal space tests from stable-2.0 (#5524)

This commit is contained in:
Roshan Lamichhane
2023-02-07 16:55:26 +05:45
committed by GitHub
parent a2798f26be
commit 19e1d63dab
3 changed files with 58 additions and 0 deletions
@@ -940,6 +940,24 @@ class OCSContext implements Context {
);
}
/**
* Parses the xml answer to return data items from ocs response
*
* @param ResponseInterface $response
*
* @return SimpleXMLElement
* @throws Exception
*/
public function getOCSResponseData(ResponseInterface $response): SimpleXMLElement {
$responseXml = $this->featureContext->getResponseXml($response, __METHOD__);
if (isset($responseXml->data)) {
return $responseXml->data;
}
throw new Exception(
"No OCS data items found in responseXml"
);
}
/**
* Parses the xml answer to get ocs response message which doesn't match with
* http one in v1 of the api.