Code Duplication    Length = 11-16 lines in 2 locations

tests/TestCase/Controller/ReportsControllerTest.php 2 locations

@@ 121-136 (lines=16) @@
118
        $this->assertEquals($expected, $result);
119
    }
120
121
    public function testMarkRelatedTo() {
122
        $this->Reports->id = 2;
123
        $incidents = $this->Reports->getIncidents();
124
        $this->assertEquals(1, $incidents->count());
125
126
        $this->post(
127
            '/reports/mark_related_to/2',
128
            ['related_to' => 4]
129
        );
130
131
        $this->Reports->id = 2;
132
        $incidents = $this->Reports->getIncidents();
133
        $this->assertEquals(3, $incidents->count());
134
135
        $this->_testUnmarkRelatedTo();
136
    }
137
138
139
    /**
@@ 146-156 (lines=11) @@
143
     *
144
     * So, call at the end of testMarkRelatedTo()
145
     */
146
    private function _testUnmarkRelatedTo()
147
    {
148
        $this->Reports->id = 2;
149
        $incidents = $this->Reports->getIncidents();
150
        $this->assertEquals(3, $incidents->count());
151
152
        $this->post('/reports/unmark_related_to/2');
153
154
        $this->Reports->id = 2;
155
        $incidents = $this->Reports->getIncidents();
156
        $this->assertEquals(1, $incidents->count());
157
    }
158
159
    /**