Code Duplication    Length = 8-8 lines in 4 locations

tests/PositionCalcualtorTest.php 4 locations

@@ 10-17 (lines=8) @@
7
class PositionCalcualtorTest extends \PHPUnit\Framework\TestCase
8
{
9
    /** @test */
10
    public function it_calculates_the_new_positon_moving_from_position_inferior_after_the_target()
11
    {
12
        $calculator = new PositionCalculator;
13
14
        $newPosition = $calculator(true, true, 2);
15
16
        $this->assertEquals(2, $newPosition);
17
    }
18
19
    /** @test */
20
    public function it_calculates_the_new_positon_moving_from_position_superior_after_the_target()
@@ 20-27 (lines=8) @@
17
    }
18
19
    /** @test */
20
    public function it_calculates_the_new_positon_moving_from_position_superior_after_the_target()
21
    {
22
        $calculator = new PositionCalculator;
23
24
        $newPosition = $calculator(true, false, 2);
25
26
        $this->assertEquals(3, $newPosition);
27
    }
28
29
    /** @test */
30
    public function it_calculates_the_new_positon_moving_from_position_inferior_before_the_target()
@@ 30-37 (lines=8) @@
27
    }
28
29
    /** @test */
30
    public function it_calculates_the_new_positon_moving_from_position_inferior_before_the_target()
31
    {
32
        $calculator = new PositionCalculator;
33
34
        $newPosition = $calculator(false, true, 2);
35
36
        $this->assertEquals(1, $newPosition);
37
    }
38
39
    /** @test */
40
    public function it_calculates_the_new_positon_moving_from_position_superior_before_the_target()
@@ 40-47 (lines=8) @@
37
    }
38
39
    /** @test */
40
    public function it_calculates_the_new_positon_moving_from_position_superior_before_the_target()
41
    {
42
        $calculator = new PositionCalculator;
43
44
        $newPosition = $calculator(false, false, 2);
45
46
        $this->assertEquals(2, $newPosition);
47
    }
48
}
49