Code Duplication    Length = 8-8 lines in 2 locations

tests/unit/RestfulServerTest.php 2 locations

@@ 302-309 (lines=8) @@
299
        unset($_SERVER['PHP_AUTH_PW']);
300
    }
301
    
302
    public function testMethodNotAllowed()
303
    {
304
        $comment1 = $this->objFromFixture('RestfulServerTest_Comment', 'comment1');
305
        
306
        $url = "/api/v1/RestfulServerTest_Comment/" . $comment1->ID;
307
        $response = Director::test($url, null, null, 'UNKNOWNHTTPMETHOD');
308
        $this->assertEquals($response->getStatusCode(), 405);
309
    }
310
    
311
    public function testConflictOnExistingResourceWhenUsingPost()
312
    {
@@ 311-318 (lines=8) @@
308
        $this->assertEquals($response->getStatusCode(), 405);
309
    }
310
    
311
    public function testConflictOnExistingResourceWhenUsingPost()
312
    {
313
        $rating1 = $this->objFromFixture('RestfulServerTest_AuthorRating', 'rating1');
314
        
315
        $url = "/api/v1/RestfulServerTest_AuthorRating/" . $rating1->ID;
316
        $response = Director::test($url, null, null, 'POST');
317
        $this->assertEquals($response->getStatusCode(), 409);
318
    }
319
    
320
    public function testUnsupportedMediaType()
321
    {