Code Duplication    Length = 13-14 lines in 2 locations

build/integration/features/bootstrap/Provisioning.php 2 locations

@@ 293-306 (lines=14) @@
290
	 * @param string $user
291
	 * @param string $group
292
	 */
293
	public function addingUserToGroup($user, $group) {
294
		$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/users/$user/groups";
295
		$client = new Client();
296
		$options = [];
297
		if ($this->currentUser === 'admin') {
298
			$options['auth'] = $this->adminUser;
299
		}
300
301
		$options['body'] = [
302
							'groupid' => $group,
303
							];
304
305
		$this->response = $client->send($client->createRequest("POST", $fullUrl, $options));
306
	}
307
308
309
	public function groupExists($group) {
@@ 384-396 (lines=13) @@
381
	 * @param string $user
382
	 * @param string $group
383
	 */
384
	public function assureUserIsSubadminOfGroup($user, $group) {
385
		$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/users/$user/subadmins";
386
		$client = new Client();
387
		$options = [];
388
		if ($this->currentUser === 'admin') {
389
			$options['auth'] = $this->adminUser;
390
		}
391
		$options['body'] = [
392
							'groupid' => $group
393
							];
394
		$this->response = $client->send($client->createRequest("POST", $fullUrl, $options));
395
		PHPUnit_Framework_Assert::assertEquals(200, $this->response->getStatusCode());
396
	}
397
398
	/**
399
	 * @Given /^user "([^"]*)" is not a subadmin of group "([^"]*)"$/