remove getResponseXml
This commit is contained in:
@@ -26,6 +26,7 @@ use Behat\Gherkin\Node\PyStringNode;
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use PHPUnit\Framework\Assert;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\OcsApiHelper;
|
||||
use TestHelpers\TranslationHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
@@ -564,7 +565,7 @@ class OCSContext implements Context {
|
||||
return (string) $jsonResponse->ocs->meta->statuscode;
|
||||
}
|
||||
// go to xml response when json response is null (it means not formatted and get status code)
|
||||
$responseXml = $this->featureContext->getResponseXml($response, __METHOD__);
|
||||
$responseXml = HttpRequestHelper::getResponseXml($response, __METHOD__);
|
||||
if (isset($responseXml->meta[0], $responseXml->meta[0]->statuscode)) {
|
||||
return (string) $responseXml->meta[0]->statuscode;
|
||||
}
|
||||
@@ -582,7 +583,7 @@ class OCSContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getOCSResponseData(ResponseInterface $response): SimpleXMLElement {
|
||||
$responseXml = $this->featureContext->getResponseXml($response, __METHOD__);
|
||||
$responseXml = HttpRequestHelper::getResponseXml($response, __METHOD__);
|
||||
if (isset($responseXml->data)) {
|
||||
return $responseXml->data;
|
||||
}
|
||||
@@ -600,7 +601,7 @@ class OCSContext implements Context {
|
||||
* @return string
|
||||
*/
|
||||
public function getOCSResponseStatusMessage(ResponseInterface $response):string {
|
||||
return (string) $this->featureContext->getResponseXml($response, __METHOD__)->meta[0]->message;
|
||||
return (string) HttpRequestHelper::getResponseXml($response, __METHOD__)->meta[0]->message;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user