From 07a8fef80e69417ad4d208d5f6198844c9e96eb4 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Mon, 29 Sep 2025 12:41:16 +0200 Subject: [PATCH] fix clicommand test --- tests/acceptance/bootstrap/GraphContext.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/bootstrap/GraphContext.php b/tests/acceptance/bootstrap/GraphContext.php index 6f55720609..c90796e247 100644 --- a/tests/acceptance/bootstrap/GraphContext.php +++ b/tests/acceptance/bootstrap/GraphContext.php @@ -2828,7 +2828,17 @@ class GraphContext implements Context { __METHOD__ . " cannot create new user '$user' by user '$byUser'.\nResponse:" . json_encode($this->featureContext->getJsonDecodedResponse($response)) ); - $this->featureContext->addUserToCreatedUsersList($user, $this->featureContext->getPasswordForUser($user)); + $responseBody = (string) $response->getBody(); + $responseData = \json_decode($responseBody, true, 512, JSON_THROW_ON_ERROR); + if ($response->getStatusCode() === 201) { + $this->featureContext->addUserToCreatedUsersList( + $user, + $this->featureContext->getPasswordForUser($user), + '', + '', + $responseData['id'] + ); + } } /**