test: add settings helper
test: move methods to helper
This commit is contained in:
@@ -553,7 +553,12 @@ class OCSContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getOCSResponseStatusCode(ResponseInterface $response):string {
|
||||
$jsonResponse = $this->featureContext->getJsonDecodedResponseBodyContent($response);
|
||||
try {
|
||||
$jsonResponse = $this->featureContext->getJsonDecodedResponseBodyContent($response);
|
||||
} catch (JsonException $e) {
|
||||
$jsonResponse = null;
|
||||
}
|
||||
|
||||
if (\is_object($jsonResponse) && $jsonResponse->ocs->meta->statuscode) {
|
||||
return (string) $jsonResponse->ocs->meta->statuscode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user