test: add settings helper

test: move methods to helper
This commit is contained in:
Saw-jan committed 2024-07-08 09:44:48 +05:45
1 parent 18d0eaa5c2
commit a8ee23734c
7 files changed
+353 -136

No files matched your search

+11
View File
@@ -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);
}
}