mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-21 18:28:27 -05:00
test: add settings helper
test: move methods to helper
This commit is contained in:
@@ -685,4 +685,15 @@ class HttpRequestHelper {
|
||||
$timeout = \getenv("REQUEST_TIMEOUT");
|
||||
return (int)$timeout ?: 60;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns json decoded body content of a json response as an object
|
||||
*
|
||||
* @param ResponseInterface $response
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getJsonDecodedResponseBodyContent(ResponseInterface $response): mixed {
|
||||
return json_decode($response->getBody()->getContents(), null, 512, JSON_THROW_ON_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user