diff options
Diffstat (limited to 'build/integration/features/bootstrap/Provisioning.php')
-rw-r--r-- | build/integration/features/bootstrap/Provisioning.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php index feeb850ae7d..ff090f5abb8 100644 --- a/build/integration/features/bootstrap/Provisioning.php +++ b/build/integration/features/bootstrap/Provisioning.php @@ -35,7 +35,6 @@ trait Provisioning { } $this->userExists($user); PHPUnit_Framework_Assert::assertEquals(200, $this->response->getStatusCode()); - } /** @@ -231,6 +230,20 @@ trait Provisioning { } /** + * @When /^user "([^"]*)" is disabled$/ + */ + public function userIsDisabled($user) { + $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/users/$user/disable"; + $client = new Client(); + $options = []; + if ($this->currentUser === 'admin') { + $options['auth'] = $this->adminUser; + } + + $this->response = $client->send($client->createRequest("PUT", $fullUrl, $options)); + } + + /** * @When /^Deleting the user "([^"]*)"$/ * @param string $user */ @@ -588,4 +601,5 @@ trait Provisioning { } $this->usingServer($previousServer); } + } |