Code Duplication    Length = 8-8 lines in 2 locations

tests/Http/SignatureTest.php 2 locations

@@ 10-17 (lines=8) @@
7
8
class SignatureTest extends TestCase
9
{
10
    public function testVerify()
11
    {
12
        $timestamp = time();
13
        $signature = hash_hmac('sha256', "{$timestamp}:", 'secret');
14
15
        $result = Signature::verify('', "{$timestamp}:{$signature}", 'secret');
16
        self::assertTrue($result);
17
    }
18
19
    public function testVerifyHeaderError()
20
    {
@@ 25-32 (lines=8) @@
22
        self::assertFalse($result);
23
    }
24
25
    public function testVerifyToleranceError()
26
    {
27
        $timestamp = time() - Signature::DEFAULT_TOLERANCE - 1;
28
        $signature = hash_hmac('sha256', "{$timestamp}:", 'secret');
29
30
        $result = Signature::verify('', "{$timestamp}:{$signature}", 'secret');
31
        self::assertFalse($result);
32
    }
33
}
34