@@ -219,11 +219,11 @@ public function restoreVersionIndexOfFile(string $user, int $versionIndex, strin
219219 $ fileId = $ this ->featureContext ->getFileIdForPath ($ user , $ path );
220220 Assert::assertNotNull ($ fileId , __METHOD__ . " fileid of file $ path user $ user not found (the file may not exist) " );
221221 $ response = $ this ->listVersionFolder ($ user , $ fileId , 1 );
222- $ responseXml = HttpRequestHelper::getResponseXml (
222+ $ responseXmlObject = HttpRequestHelper::getResponseXml (
223223 $ response ,
224224 __METHOD__
225225 );
226- $ xmlPart = $ responseXml ->xpath ("//d:response/d:href " );
226+ $ xmlPart = $ responseXmlObject ->xpath ("//d:response/d:href " );
227227 //restoring the version only works with DAV path v2
228228 $ destinationUrl = $ this ->featureContext ->getBaseUrl () . "/ " .
229229 WebDavHelper::getDavPath (WebDavHelper::DAV_VERSION_NEW , $ user ) . \trim ($ path , "/ " );
@@ -281,18 +281,18 @@ public function userRestoresVersionIndexOfFile(string $user, int $versionIndex,
281281 */
282282 public function assertFileVersionsCount (string $ user , string $ fileId , int $ expectedCount ):void {
283283 $ response = $ this ->listVersionFolder ($ user , $ fileId , 1 );
284- $ responseXml = HttpRequestHelper::getResponseXml (
284+ $ responseXmlObject = HttpRequestHelper::getResponseXml (
285285 $ response ,
286286 __METHOD__
287287 );
288- $ actualCount = \count ($ responseXml ->xpath ("//d:prop/d:getetag " )) - 1 ;
288+ $ actualCount = \count ($ responseXmlObject ->xpath ("//d:prop/d:getetag " )) - 1 ;
289289 if ($ actualCount === -1 ) {
290290 $ actualCount = 0 ;
291291 }
292292 Assert::assertEquals (
293293 $ expectedCount ,
294294 $ actualCount ,
295- "Expected $ expectedCount versions but found $ actualCount in \n" . $ responseXml ->asXML ()
295+ "Expected $ expectedCount versions but found $ actualCount in \n" . $ responseXmlObject ->asXML ()
296296 );
297297 }
298298
@@ -356,11 +356,11 @@ public function theContentLengthOfFileForUserInVersionsFolderIs(
356356 $ fileId = $ this ->featureContext ->getFileIdForPath ($ user , $ path );
357357 Assert::assertNotNull ($ fileId , __METHOD__ . " fileid of file $ path user $ user not found (the file may not exist) " );
358358 $ response = $ this ->listVersionFolder ($ user , $ fileId , 1 , ['d:getcontentlength ' ]);
359- $ responseXml = HttpRequestHelper::getResponseXml (
359+ $ responseXmlObject = HttpRequestHelper::getResponseXml (
360360 $ response ,
361361 __METHOD__
362362 );
363- $ xmlPart = $ responseXml ->xpath ("//d:prop/d:getcontentlength " );
363+ $ xmlPart = $ responseXmlObject ->xpath ("//d:prop/d:getcontentlength " );
364364 Assert::assertEquals (
365365 $ length ,
366366 (int ) $ xmlPart [$ index ],
@@ -422,8 +422,8 @@ public function downloadVersion(string $user, string $path, string $index, ?stri
422422 if ($ response ->getStatusCode () === 403 ) {
423423 return $ response ;
424424 }
425- $ responseXml = new SimpleXMLElement ($ response ->getBody ()->getContents ());
426- $ xmlPart = $ responseXml ->xpath ("//d:response/d:href " );
425+ $ responseXmlObject = new SimpleXMLElement ($ response ->getBody ()->getContents ());
426+ $ xmlPart = $ responseXmlObject ->xpath ("//d:response/d:href " );
427427 if (!isset ($ xmlPart [$ index ])) {
428428 Assert::fail (
429429 'could not find version of path " ' . $ path . '" with index " ' . $ index . '" '
@@ -519,11 +519,6 @@ public function userGetMetaInfo(string $user, string $fileOrFileId, string $path
519519 null
520520 );
521521 $ this ->featureContext ->setResponse ($ response );
522- $ responseXml = HttpRequestHelper::getResponseXml (
523- $ response ,
524- __METHOD__
525- );
526- $ this ->featureContext ->setResponseXmlObject ($ responseXml );
527522 }
528523
529524 /**
0 commit comments