diff --git a/tests/TestHelpers/GraphHelper.php b/tests/TestHelpers/GraphHelper.php index aa8dc20f296..13e121c1c41 100644 --- a/tests/TestHelpers/GraphHelper.php +++ b/tests/TestHelpers/GraphHelper.php @@ -523,7 +523,7 @@ public static function preparePatchUserPayload( } return \json_encode($payload); } - + /** * Send Graph Create Space Request * @@ -668,13 +668,13 @@ public static function getSingleSpace( /** * send disable space request - * + * * @param string $baseUrl * @param string $user * @param string $password * @param string $spaceId * @param string $xRequestId - * + * * @return ResponseInterface * @throws GuzzleException */ @@ -686,7 +686,7 @@ public static function disableSpace( string $xRequestId = '' ): ResponseInterface { $url = self::getFullUrl($baseUrl, 'drives/' . $spaceId); - + return HttpRequestHelper::delete( $url, $xRequestId, @@ -697,14 +697,13 @@ public static function disableSpace( /** * send delete space request - * + * * @param string $baseUrl * @param string $user * @param string $password * @param string $spaceId - * @param array $header * @param string $xRequestId - * + * * @return ResponseInterface * @throws GuzzleException */ @@ -713,11 +712,11 @@ public static function deleteSpace( string $user, string $password, string $spaceId, - array $header, string $xRequestId = '' ): ResponseInterface { $url = self::getFullUrl($baseUrl, 'drives/' . $spaceId); - + $header = ["Purge" => "T"]; + return HttpRequestHelper::delete( $url, $xRequestId, @@ -750,7 +749,7 @@ public static function restoreSpace( return HttpRequestHelper::sendRequest($url, '', 'PATCH', $user, $password, $header, $body); } - + /** * @param string $baseUrl * @param string $xRequestId @@ -773,7 +772,7 @@ public static function changeOwnPassword( $url = self::getFullUrl($baseUrl, 'me/changePassword'); $payload['currentPassword'] = $currentPassword; $payload['newPassword'] = $newPassword; - + return HttpRequestHelper::sendRequest( $url, $xRequestId, diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index b9fa4b7964b..2d9daac048b 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -2334,16 +2334,14 @@ public function sendDeleteSpaceRequest( string $user, string $spaceName ): void { - $header = ["Purge" => "T"]; $space = $this->getSpaceByName($user, $spaceName); - + $this->featureContext->setResponse( GraphHelper::deleteSpace( $this->featureContext->getBaseUrl(), $user, $this->featureContext->getPasswordForUser($user), - $space["id"], - $header + $space["id"] ) ); }