[tests-only] removing the setresponse in given/when/then step in ocs and webdavlocking context (#7347)
* refactor given and when steps in ocs and webdav locking context * use the returned response * use of returned response from helper function * made changes to the affected test steps * deleted vardump line
This commit is contained in:
@@ -2970,14 +2970,14 @@ class SpacesContext implements Context {
|
||||
|
||||
$url = "/apps/files_sharing/api/v1/shares?reshares=true&space_ref=" . $body;
|
||||
|
||||
$this->ocsContext->userSendsHTTPMethodToOcsApiEndpointWithBody(
|
||||
$response = $this->ocsContext->userSendsHTTPMethodToOcsApiEndpointWithBody(
|
||||
$user,
|
||||
'GET',
|
||||
$url,
|
||||
);
|
||||
|
||||
$should = ($shouldOrNot !== "not");
|
||||
$responseArray = json_decode(json_encode($this->featureContext->getResponseXml()->data), true, 512, JSON_THROW_ON_ERROR);
|
||||
$responseArray = json_decode(json_encode($this->featureContext->getResponseXml($response)->data), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
if ($should) {
|
||||
Assert::assertNotEmpty($responseArray, __METHOD__ . ' Response should contain a link, but it is empty');
|
||||
|
||||
Reference in New Issue
Block a user