Code Duplication    Length = 14-14 lines in 3 locations

Tests/Units/Security/Firewall/ReplayProtection.php 3 locations

@@ 24-37 (lines=14) @@
21
    /**
22
     * @dataProvider dummyCases
23
     */
24
    public function test_disabled_state_should_accept_all_signatureTime($lifetime, $signatureTime, $currentTime)
25
    {
26
        $this
27
            ->given(
28
                $sut = new SUT(false, $lifetime)
29
            )
30
            ->when(
31
                $accepted = $sut->accept($signatureTime, $currentTime)
32
            )
33
            ->then
34
                ->boolean($accepted)
35
                    ->isTrue()
36
        ;
37
    }
38
39
    public function dummyCases()
40
    {
@@ 51-64 (lines=14) @@
48
    /**
49
     * @dataProvider goodCases
50
     */
51
    public function test_it_should_accept_signatureTime_still_valid($lifetime, $signatureTime, $currentTime)
52
    {
53
        $this
54
            ->given(
55
                $sut = new SUT(true, $lifetime)
56
            )
57
            ->when(
58
                $accepted = $sut->accept($signatureTime, $currentTime)
59
            )
60
            ->then
61
                ->boolean($accepted)
62
                    ->isTrue()
63
        ;
64
    }
65
66
    public function goodCases()
67
    {
@@ 79-92 (lines=14) @@
76
    /**
77
     * @dataProvider wrongCases
78
     */
79
    public function test_it_should_not_accept_signatureTime_expired($lifetime, $signatureTime, $currentTime)
80
    {
81
        $this
82
            ->given(
83
                $sut = new SUT(true, $lifetime)
84
            )
85
            ->when(
86
                $accepted = $sut->accept($signatureTime, $currentTime)
87
            )
88
            ->then
89
                ->boolean($accepted)
90
                    ->isFalse()
91
        ;
92
    }
93
94
    public function wrongCases()
95
    {