Make test code better for CI (#7190)

This commit is contained in:
Sagar Gurung
2023-09-01 16:42:35 +05:45
committed by GitHub
parent 9c3511d2b0
commit 76d6f12657
2 changed files with 17 additions and 5 deletions
@@ -3170,6 +3170,10 @@ class SpacesContext implements Context {
$xmlRes = $this->featureContext->getResponseXml();
foreach ($table->getHash() as $row) {
$findItem = $row['key'];
Assert::assertNotEmpty(
$xmlRes->xpath("//d:response/d:propstat/d:prop/$findItem"),
'The xml response "' . $xmlRes->asXML() . '" did not contain "<' . $findItem . '>" element'
);
$responseValue = $xmlRes->xpath("//d:response/d:propstat/d:prop/$findItem")[0]->__toString();
$value = str_replace('UUIDof:', '', $row['value']);
switch ($findItem) {