Code Duplication    Length = 8-9 lines in 3 locations

tests/Functional/Controller/EmployeesControllerTest.php 1 location

@@ 26-34 (lines=9) @@
23
        $this->restRequest('/api/employees/nonexistent-slug/roles', 'GET', 404);
24
    }
25
26
    public function testEmployeesResponseFields()
27
    {
28
        $this->restRequest('/api/employees');
29
30
        $content = $this->getSessionClient()->getResponse()->getContent();
31
        foreach ($this->getFields() as $field) {
32
            $this->assertContains($field, $content);
33
        }
34
    }
35
36
    public function getFields()
37
    {

tests/Functional/Controller/PerformanceEventsControllerTest.php 1 location

@@ 19-26 (lines=8) @@
16
        $this->restRequest('/api/performanceevents/100500', 'GET', 404);
17
    }
18
19
    public function testPerformanceEventsResponseFields()
20
    {
21
        $this->restRequest('/api/performanceevents');
22
        $content = $this->getSessionClient()->getResponse()->getContent();
23
        foreach ($this->getFields() as $field) {
24
            $this->assertContains($field, $content);
25
        }
26
    }
27
28
    public function getFields()
29
    {

tests/Functional/Controller/PerformancesControllerTest.php 1 location

@@ 45-52 (lines=8) @@
42
        $this->restRequest('/api/performances/nonexistent-slug/performanceevents', 'GET', 404);
43
    }
44
45
    public function testPerformancesResponseFields()
46
    {
47
        $this->restRequest('/api/performances');
48
        $content = $this->getSessionClient()->getResponse()->getContent();
49
        foreach ($this->getFields() as $field) {
50
            $this->assertContains($field, $content);
51
        }
52
    }
53
54
    public function getFields()
55
    {