test: allow items check for multiple array items
This commit is contained in:
@@ -28,11 +28,10 @@ use Psr\Http\Message\ResponseInterface;
|
||||
* A helper class for managing Auth App API requests
|
||||
*/
|
||||
class AuthAppHelper {
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function getAuthAppEndpoint():string {
|
||||
public static function getAuthAppEndpoint(): string {
|
||||
return "/auth-app/tokens";
|
||||
}
|
||||
|
||||
@@ -43,7 +42,7 @@ class AuthAppHelper {
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public static function listAllAppAuthToken(string $baseUrl, string $user, string $password) : ResponseInterface {
|
||||
public static function listAllAppAuthTokensForUser(string $baseUrl, string $user, string $password): ResponseInterface {
|
||||
$url = $baseUrl . self::getAuthAppEndpoint();
|
||||
return HttpRequestHelper::sendRequest(
|
||||
$url,
|
||||
@@ -62,7 +61,7 @@ class AuthAppHelper {
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public static function createAppAuthToken(string $baseUrl, string $user, string $password, string $expiration) : ResponseInterface {
|
||||
public static function createAppAuthToken(string $baseUrl, string $user, string $password, string $expiration): ResponseInterface {
|
||||
$url = $baseUrl . self::getAuthAppEndpoint() . "?expiry=$expiration";
|
||||
return HttpRequestHelper::sendRequest(
|
||||
$url,
|
||||
@@ -81,7 +80,7 @@ class AuthAppHelper {
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public static function deleteAppAuthToken(string $baseUrl, string $user, string $password, string $token) : ResponseInterface {
|
||||
public static function deleteAppAuthToken(string $baseUrl, string $user, string $password, string $token): ResponseInterface {
|
||||
$url = $baseUrl . self::getAuthAppEndpoint() . "?token=$token";
|
||||
return HttpRequestHelper::sendRequest(
|
||||
$url,
|
||||
|
||||
Reference in New Issue
Block a user