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
        $this->Reports->id = 2;
148
        $incidents = $this->Reports->getIncidents();
149
        $this->assertEquals(3, $incidents->count());
150
151
        $this->post('/reports/unmark_related_to/2');
152
153
        $this->Reports->id = 2;
154
        $incidents = $this->Reports->getIncidents();
155
        $this->assertEquals(1, $incidents->count());
156
    }
157
}
158