Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 381-388 (lines=8) @@
378
	/**
379
	 * @Then /^last share_id is included in the answer as parent$/
380
	 */
381
	public function checkingLastShareIDIsIncludedAsParent(){
382
		$share_id = $this->lastShareData->data[0]->id;
383
		//This is a problem before 9.0, setupFS is called with every api call so a new share id is created
384
		//we just need to check the parent id to match with the returned id.
385
		if (!$this->isFieldInResponse('parent', $share_id)){
386
			PHPUnit_Framework_Assert::fail("Share id $share_id not found in response as parent");
387
		}
388
	}
389
390
	/**
391
	 * @Then /^last share_id is not included in the answer$/
@@ 403-410 (lines=8) @@
400
	/**
401
	 * @Then /^last share_id is not included in the answer as parent$/
402
	 */
403
	public function checkingLastShareIDIsNotIncludedAsParent(){
404
		$share_id = $this->lastShareData->data[0]->id;
405
		//This is a problem before 9.0, setupFS is called with every api call so a new share id is created
406
		//we just need to check the parent id to match with the returned id.
407
		if ($this->isFieldInResponse('parent', $share_id)){
408
			PHPUnit_Framework_Assert::fail("Share id $share_id has been found in response as parent");
409
		}
410
	}
411
412
	/**
413
	 * @Then /^Share fields of last share match with$/