Passed
Branch master (a88228)
by Antonio Carlos
03:04
created

CacheTest::test_cache_put()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
3
namespace PragmaRX\Firewall\Tests;
4
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