Code Duplication    Length = 12-13 lines in 2 locations

tests/BlacklistTest.php 2 locations

@@ 71-83 (lines=13) @@
68
        $this->assertTrue($list->has($this->tokenStub($id, $exp)));
69
    }
70
71
    public function testHasNonExisting()
72
    {
73
        $id = uniqid();
74
        $exp = time() + 3600;
75
76
        $storage = m::mock(\Framgia\Jwt\Contracts\Storage::class);
77
78
        $list = new \Framgia\Jwt\Blacklist($storage);
79
80
        $storage->shouldReceive('get')->once()->with($id)->andReturn(null);
81
82
        $this->assertFalse($list->has($this->tokenStub($id, $exp)));
83
    }
84
85
    public function testHasFuture()
86
    {
@@ 114-125 (lines=12) @@
111
        $this->assertTrue($list->has($this->tokenStub($id)));
112
    }
113
114
    public function testRemove()
115
    {
116
        $id = uniqid();
117
118
        $storage = m::mock(\Framgia\Jwt\Contracts\Storage::class);
119
120
        $list = new \Framgia\Jwt\Blacklist($storage);
121
122
        $storage->shouldReceive('destroy')->once()->with($id)->andReturn(true);
123
124
        $this->assertTrue($list->remove($this->tokenStub($id)));
125
    }
126
127
    public function testClear()
128
    {