| 1 | <?php |
||
| 5 | class CacheTest extends TestCase |
||
| 6 | { |
||
| 7 | public function setUp() |
||
| 8 | { |
||
| 9 | parent::setup(); |
||
| 10 | |||
| 11 | $this->cache = app('firewall.cache'); |
||
| 12 | } |
||
| 13 | |||
| 14 | public function test_cache_put() |
||
| 15 | { |
||
| 16 | foreach (range(1, 100) as $counter) { |
||
| 17 | $this->cache->put($key = '1234', $this->cache->get($key, 0) + 1, 10); |
||
| 18 | } |
||
| 19 | |||
| 20 | $this->assertEquals(100, $this->cache->get($key)); |
||
| 21 | } |
||
| 22 | } |
||
| 23 |