[tests-only][full-ci] removing the setresponse in given/then step in AppConfigurationContext and AuthContext (#7186)
* removing setting response in the given steps * use response interface * use the returned response * check success response * changed to inline variable * changed variable response_xml to responseXml
This commit is contained in:
@@ -2302,9 +2302,11 @@ class FeatureContext extends BehatVariablesContext {
|
||||
$jsonExpectedDecoded = \json_decode($jsonExpected->getRaw(), true);
|
||||
$jsonRespondedDecoded = $this->getJsonDecodedResponse();
|
||||
|
||||
$this->appConfigurationContext->theAdministratorGetsCapabilitiesCheckResponse();
|
||||
$response = $this->appConfigurationContext->userGetsCapabilities($this->appConfigurationContext->getAdminUsernameForCapabilitiesCheck());
|
||||
$this->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
$responseXml = $this->getResponseXml($response)->data->capabilities;
|
||||
$edition = $this->appConfigurationContext->getParameterValueFromXml(
|
||||
$this->appConfigurationContext->getCapabilitiesXml(__METHOD__),
|
||||
$responseXml,
|
||||
'core',
|
||||
'status@@@edition'
|
||||
);
|
||||
@@ -2316,7 +2318,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
$product = $this->appConfigurationContext->getParameterValueFromXml(
|
||||
$this->appConfigurationContext->getCapabilitiesXml(__METHOD__),
|
||||
$responseXml,
|
||||
'core',
|
||||
'status@@@product'
|
||||
);
|
||||
@@ -2327,7 +2329,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
$productName = $this->appConfigurationContext->getParameterValueFromXml(
|
||||
$this->appConfigurationContext->getCapabilitiesXml(__METHOD__),
|
||||
$responseXml,
|
||||
'core',
|
||||
'status@@@productname'
|
||||
);
|
||||
@@ -2345,7 +2347,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
// We are on oCIS or reva or some other implementation. We cannot do "occ status".
|
||||
// So get the expected version values by looking in the capabilities response.
|
||||
$version = $this->appConfigurationContext->getParameterValueFromXml(
|
||||
$this->appConfigurationContext->getCapabilitiesXml(__METHOD__),
|
||||
$responseXml,
|
||||
'core',
|
||||
'status@@@version'
|
||||
);
|
||||
@@ -2357,7 +2359,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
$versionString = $this->appConfigurationContext->getParameterValueFromXml(
|
||||
$this->appConfigurationContext->getCapabilitiesXml(__METHOD__),
|
||||
$responseXml,
|
||||
'core',
|
||||
'status@@@versionstring'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user