Code Duplication    Length = 8-8 lines in 4 locations

tests/Date/ComparisonTest.php 4 locations

@@ 273-280 (lines=8) @@
270
        $this->assertTrue($dt3->isBirthday($dt1));
271
    }
272
273
    public function testClosest()
274
    {
275
        $instance = Date::create(2015, 5, 28, 12, 0, 0);
276
        $dt1 = Date::create(2015, 5, 28, 11, 0, 0);
277
        $dt2 = Date::create(2015, 5, 28, 14, 0, 0);
278
        $closest = $instance->closest($dt1, $dt2);
279
        $this->assertEquals($dt1, $closest);
280
    }
281
282
    public function testClosestWithEquals()
283
    {
@@ 282-289 (lines=8) @@
279
        $this->assertEquals($dt1, $closest);
280
    }
281
282
    public function testClosestWithEquals()
283
    {
284
        $instance = Date::create(2015, 5, 28, 12, 0, 0);
285
        $dt1 = Date::create(2015, 5, 28, 12, 0, 0);
286
        $dt2 = Date::create(2015, 5, 28, 14, 0, 0);
287
        $closest = $instance->closest($dt1, $dt2);
288
        $this->assertEquals($dt1, $closest);
289
    }
290
291
    public function testFarthest()
292
    {
@@ 291-298 (lines=8) @@
288
        $this->assertEquals($dt1, $closest);
289
    }
290
291
    public function testFarthest()
292
    {
293
        $instance = Date::create(2015, 5, 28, 12, 0, 0);
294
        $dt1 = Date::create(2015, 5, 28, 11, 0, 0);
295
        $dt2 = Date::create(2015, 5, 28, 14, 0, 0);
296
        $Farthest = $instance->farthest($dt1, $dt2);
297
        $this->assertEquals($dt2, $Farthest);
298
    }
299
300
    public function testFarthestWithEquals()
301
    {
@@ 300-307 (lines=8) @@
297
        $this->assertEquals($dt2, $Farthest);
298
    }
299
300
    public function testFarthestWithEquals()
301
    {
302
        $instance = Date::create(2015, 5, 28, 12, 0, 0);
303
        $dt1 = Date::create(2015, 5, 28, 12, 0, 0);
304
        $dt2 = Date::create(2015, 5, 28, 14, 0, 0);
305
        $Farthest = $instance->farthest($dt1, $dt2);
306
        $this->assertEquals($dt2, $Farthest);
307
    }
308
}
309