Code Duplication    Length = 7-7 lines in 2 locations

tests/functional/controllers/NestedResourceRestControllerTest.php 2 locations

@@ 15-21 (lines=7) @@
12
        ]);
13
    }
14
15
    public function testControllerGET() {
16
        $id = 'Foo';
17
        $result = $this->makeApiRequest("RestTestRoute/$id/Nested");
18
        $this->assertTrue(array_key_exists('message', $result));
19
        $this->assertEquals('Test GET', $result['message']);
20
        $this->assertEquals($id, $result['resource']['id']);
21
    }
22
23
    public function testNotProvidedID() {
24
        $this->makeApiRequest("RestTestRoute//Nested", ['code' => 404]);
@@ 28-34 (lines=7) @@
25
    }
26
27
28
    public function testControllerDELETE() {
29
        $id = 'Bar';
30
        $result = $this->makeApiRequest("RestTestRoute/$id/Nested", ['method' => 'DELETE']);
31
        $this->assertTrue(array_key_exists('message', $result));
32
        $this->assertEquals('Test DELETE', $result['message']);
33
        $this->assertEquals($id, $result['resource']['id']);
34
    }
35
}
36
37
class NestedTestController extends NestedResourceRestController implements TestOnly {