mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-23 04:28:48 -05:00
test: make remote.php configurable
test: build dav paths test: fix paths test: merge method args test: add issue tags test: add new expected failure file test: merge expected-failure files before running tests
This commit is contained in:
@@ -52,48 +52,6 @@ class GraphContext implements Context {
|
||||
$this->spacesContext = BehatHelper::getContext($scope, $environment, 'SpacesContext');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string|null $userName
|
||||
* @param string|null $password
|
||||
* @param string|null $email
|
||||
* @param string|null $displayName
|
||||
* @param string|null $requester
|
||||
* @param string|null $requesterPassword
|
||||
*
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function userHasBeenEditedUsingTheGraphApi(
|
||||
string $user,
|
||||
?string $userName = null,
|
||||
?string $password = null,
|
||||
?string $email = null,
|
||||
?string $displayName = null,
|
||||
?string $requester = null,
|
||||
?string $requesterPassword = null
|
||||
): void {
|
||||
if (!$requester) {
|
||||
$requester = $this->featureContext->getAdminUsername();
|
||||
$requesterPassword = $this->featureContext->getAdminPassword();
|
||||
}
|
||||
$userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$response = GraphHelper::editUser(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$requester,
|
||||
$requesterPassword,
|
||||
$userId,
|
||||
$userName,
|
||||
$password,
|
||||
$email,
|
||||
$displayName
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
$this->featureContext->theHttpStatusCodeShouldBe(200); // TODO 204 when prefer=minimal header was sent
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the user "([^"]*)" changes the email of user "([^"]*)" to "([^"]*)" using the Graph API$/
|
||||
* @When /^the user "([^"]*)" tries to change the email of user "([^"]*)" to "([^"]*)" using the Graph API$/
|
||||
|
||||
Reference in New Issue
Block a user