Code Duplication    Length = 7-7 lines in 2 locations

tests/unit/RestfulServerTest.php 2 locations

@@ 277-283 (lines=7) @@
274
		unset($_SERVER['PHP_AUTH_PW']);
275
	}
276
	
277
	public function testMethodNotAllowed() {
278
		$comment1 = $this->objFromFixture('RestfulServerTest_Comment', 'comment1');
279
		
280
		$url = "/api/v1/RestfulServerTest_Comment/" . $comment1->ID;
281
		$response = Director::test($url, null, null, 'UNKNOWNHTTPMETHOD');
282
		$this->assertEquals($response->getStatusCode(), 405);
283
	}
284
	
285
	public function testConflictOnExistingResourceWhenUsingPost() {
286
		$rating1 = $this->objFromFixture('RestfulServerTest_AuthorRating', 'rating1');
@@ 285-291 (lines=7) @@
282
		$this->assertEquals($response->getStatusCode(), 405);
283
	}
284
	
285
	public function testConflictOnExistingResourceWhenUsingPost() {
286
		$rating1 = $this->objFromFixture('RestfulServerTest_AuthorRating', 'rating1');
287
		
288
		$url = "/api/v1/RestfulServerTest_AuthorRating/" . $rating1->ID;
289
		$response = Director::test($url, null, null, 'POST');
290
		$this->assertEquals($response->getStatusCode(), 409);
291
	}
292
	
293
	public function testUnsupportedMediaType() {
294
		$_SERVER['PHP_AUTH_USER'] = '[email protected]';