forward-port of relative quota amount of personal space tests from stable-2.0 (#5524)
This commit is contained in:
@@ -3226,4 +3226,27 @@ class SpacesContext implements Context {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the relative quota amount should be :quota_amount
|
||||
*
|
||||
* @param string $quotaAmount
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theRelativeQuotaAmountShouldBe(string $quotaAmount): void {
|
||||
$data = $this->ocsContext->getOCSResponseData($this->featureContext->getResponse());
|
||||
if (isset($data->quota, $data->quota->relative)) {
|
||||
Assert::assertEquals(
|
||||
$data->quota->relative,
|
||||
$quotaAmount,
|
||||
"Expected relative quota amount to be $quotaAmount but found to be $data->quota->relative"
|
||||
);
|
||||
} else {
|
||||
throw new Exception(
|
||||
"No relative quota amount found in responseXml"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user