fix clicommand test

This commit is contained in:
Viktor Scharf
2025-09-29 12:41:16 +02:00
committed by Ralf Haferkamp
parent 0399398bc8
commit 07a8fef80e

View File

@@ -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']
);
}
}
/**