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

CacheTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 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