[test-only] apiTest. change own password (#4480)

* apiTest. change own password

* fix
This commit is contained in:
Viktor Scharf
2022-08-31 13:02:33 +02:00
committed by GitHub
parent 7d39e02dc4
commit 3b548c9be3
3 changed files with 72 additions and 0 deletions
@@ -536,4 +536,25 @@ class GraphContext implements Context {
}
}
}
/**
* @When /^the user "([^"]*)" changes its own password "([^"]*)" to "([^"]*)" using the Graph API$/
* @param string $user
* @param string $currentPassword
* @param string $newPassword
*
* @throws GuzzleException
* @throws Exception
*/
public function userChangesOwnPassword(string $user, string $currentPassword, $newPassword): void {
$response = GraphHelper::changeOwnPassword(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$currentPassword,
$newPassword
);
$this->featureContext->setResponse($response);
}
}