Code Duplication    Length = 10-11 lines in 2 locations

tests/controller/accountscontrollertest.php 2 locations

@@ 149-158 (lines=10) @@
146
		$this->assertEquals($expectedResponse, $response);
147
	}
148
149
	public function testDestroy() {
150
		$this->accountService->expects($this->once())
151
			->method('delete')
152
			->with($this->equalTo($this->userId), $this->equalTo($this->accountId));
153
154
		$response = $this->controller->destroy($this->accountId);
155
156
		$expectedResponse = new JSONResponse();
157
		$this->assertEquals($expectedResponse, $response);
158
	}
159
160
	public function testDestroyDoesNotExist() {
161
		$this->accountService->expects($this->once())
@@ 160-170 (lines=11) @@
157
		$this->assertEquals($expectedResponse, $response);
158
	}
159
160
	public function testDestroyDoesNotExist() {
161
		$this->accountService->expects($this->once())
162
			->method('delete')
163
			->with($this->equalTo($this->userId), $this->equalTo($this->accountId))
164
			->will($this->throwException(new \OCP\AppFramework\Db\DoesNotExistException('test')));
165
166
		$response = $this->controller->destroy($this->accountId);
167
168
		$expectedResponse = new JSONResponse();
169
		$this->assertEquals($expectedResponse, $response);
170
	}
171
172
	public function testCreateAutoDetectSuccess() {
173
		$email = '[email protected]';