mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-10-23 06:39:13 -04:00
test: add settings helper
test: move methods to helper
This commit is contained in:
7 files changed
+353
-136
No files matched your search
@@ -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