|
@@ 235-244 (lines=10) @@
|
| 232 |
|
/** |
| 233 |
|
* @When /^assure user "([^"]*)" is disabled$/ |
| 234 |
|
*/ |
| 235 |
|
public function assureUserIsDisabled($user) { |
| 236 |
|
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/users/$user/disable"; |
| 237 |
|
$client = new Client(); |
| 238 |
|
$options = []; |
| 239 |
|
if ($this->currentUser === 'admin') { |
| 240 |
|
$options['auth'] = $this->adminUser; |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
$this->response = $client->send($client->createRequest("PUT", $fullUrl, $options)); |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
/** |
| 247 |
|
* @When /^Deleting the user "([^"]*)"$/ |
|
@@ 250-259 (lines=10) @@
|
| 247 |
|
* @When /^Deleting the user "([^"]*)"$/ |
| 248 |
|
* @param string $user |
| 249 |
|
*/ |
| 250 |
|
public function deletingTheUser($user) { |
| 251 |
|
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/users/$user"; |
| 252 |
|
$client = new Client(); |
| 253 |
|
$options = []; |
| 254 |
|
if ($this->currentUser === 'admin') { |
| 255 |
|
$options['auth'] = $this->adminUser; |
| 256 |
|
} |
| 257 |
|
|
| 258 |
|
$this->response = $client->send($client->createRequest("DELETE", $fullUrl, $options)); |
| 259 |
|
} |
| 260 |
|
|
| 261 |
|
/** |
| 262 |
|
* @When /^Deleting the group "([^"]*)"$/ |
|
@@ 265-274 (lines=10) @@
|
| 262 |
|
* @When /^Deleting the group "([^"]*)"$/ |
| 263 |
|
* @param string $group |
| 264 |
|
*/ |
| 265 |
|
public function deletingTheGroup($group) { |
| 266 |
|
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/groups/$group"; |
| 267 |
|
$client = new Client(); |
| 268 |
|
$options = []; |
| 269 |
|
if ($this->currentUser === 'admin') { |
| 270 |
|
$options['auth'] = $this->adminUser; |
| 271 |
|
} |
| 272 |
|
|
| 273 |
|
$this->response = $client->send($client->createRequest("DELETE", $fullUrl, $options)); |
| 274 |
|
} |
| 275 |
|
|
| 276 |
|
/** |
| 277 |
|
* @Given /^Add user "([^"]*)" to the group "([^"]*)"$/ |