@@ 138-150 (lines=13) @@ | ||
135 | $this->assertTrue($list->clear()); |
|
136 | } |
|
137 | ||
138 | public function testSetRefreshTTL() |
|
139 | { |
|
140 | $storage = m::mock(\Framgia\Jwt\Contracts\Storage::class); |
|
141 | ||
142 | $list = new \Framgia\Jwt\Blacklist($storage); |
|
143 | ||
144 | $reflection = new ReflectionClass($list); |
|
145 | $property = $reflection->getProperty('refreshTTL'); |
|
146 | $property->setAccessible(true); |
|
147 | ||
148 | $this->assertEquals($list, $list->setRefreshTTL(500)); |
|
149 | $this->assertEquals(500, $property->getValue($list)); |
|
150 | } |
|
151 | ||
152 | public function testSetGracePeriod() |
|
153 | { |
|
@@ 152-164 (lines=13) @@ | ||
149 | $this->assertEquals(500, $property->getValue($list)); |
|
150 | } |
|
151 | ||
152 | public function testSetGracePeriod() |
|
153 | { |
|
154 | $storage = m::mock(\Framgia\Jwt\Contracts\Storage::class); |
|
155 | ||
156 | $list = new \Framgia\Jwt\Blacklist($storage); |
|
157 | ||
158 | $reflection = new ReflectionClass($list); |
|
159 | $property = $reflection->getProperty('gracePeriod'); |
|
160 | $property->setAccessible(true); |
|
161 | ||
162 | $this->assertEquals($list, $list->setGracePeriod(500)); |
|
163 | $this->assertEquals(500, $property->getValue($list)); |
|
164 | } |
|
165 | ||
166 | protected function tokenStub($id = null, $exp = null, $claims = []) |
|
167 | { |