Code Duplication    Length = 15-15 lines in 2 locations

tests/Exceptions/OpenWeatherMapExceptionTest.php 2 locations

@@ 191-205 (lines=15) @@
188
    /**
189
     * @expectedException Exception
190
     */
191
    public function testParseXMLException()
192
    {
193
        $answer = 'I am not a XML fromat data';
194
        $weather = $this->weather;
195
        $method = new \ReflectionMethod(
196
            $weather, 'parseXML'
197
        );
198
        $method->setAccessible(true);
199
        
200
        try {
201
            $method->invoke($weather, $answer);
202
        } catch (\Exception $e) {
203
            throw $e;
204
        }
205
    }
206
207
    /**
208
     * @expectedException Exception
@@ 230-244 (lines=15) @@
227
    /**
228
     * @expectedException \Cmfcmf\OpenWeatherMap\Exception
229
     */
230
    public function testParseJsonException()
231
    {
232
        $weather = $this->weather;
233
        $answer = 'I am not a json format data';
234
        $method = new \ReflectionMethod(
235
            $weather, 'parseJson'
236
        );
237
        $method->setAccessible(true);
238
        
239
        try {
240
            $method->invoke($weather, $answer);
241
        } catch (\Exception $e) {
242
            throw $e;
243
        }
244
    }
245
}
246