Code Duplication    Length = 8-8 lines in 3 locations

apps/provisioning_api/tests/groupstest.php 2 locations

@@ 159-166 (lines=8) @@
156
		$this->assertEquals(['group1', 'group2'], $result->getData()['groups']);
157
	}
158
159
	public function testGetGroupAsUser() {
160
		$result = $this->api->getGroup([]);
161
162
		$this->assertInstanceOf('OC_OCS_Result', $result);
163
		$this->assertFalse($result->succeeded());
164
		$this->assertEquals(\OCP\API::RESPOND_UNAUTHORISED, $result->getStatusCode());
165
166
	}
167
168
	public function testGetGroupAsSubadmin() {
169
		$group = $this->createGroup('group');
@@ 376-383 (lines=8) @@
373
		$this->assertTrue($result->succeeded());
374
	}
375
376
	public function testDeleteGroupNonExisting() {
377
		$result = $this->api->deleteGroup([
378
			'groupid' => 'NonExistingGroup'
379
		]);
380
		$this->assertInstanceOf('OC_OCS_Result', $result);
381
		$this->assertFalse($result->succeeded());
382
		$this->assertEquals(101, $result->getStatusCode());
383
	}
384
385
	public function testDeleteAdminGroup() {
386
		$this->groupManager

apps/provisioning_api/tests/appstest.php 1 location

@@ 65-72 (lines=8) @@
62
		$this->assertTrue($result->succeeded());
63
	}
64
65
	public function testGetAppInfoOnBadAppID() {
66
		$result = $this->api->getAppInfo(['appid' => 'not_provisioning_api']);
67
		$this->assertInstanceOf('OC_OCS_Result', $result);
68
		$this->assertFalse($result->succeeded());
69
		$this->assertEquals(API::RESPOND_NOT_FOUND, $result->getStatusCode());
70
	}
71
72
	public function testGetApps() {
73
		$this->ocsClient
74
				->expects($this->any())
75
				->method($this->anything())