Completed
Push — master ( 89d155...6a85db )
by Dan
13:52 queued 06:12
created

NullStorageTest::testDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Tests\Ds\Cache;
4
5
use Ds\Cache\NullStorage;
6
7
class NullStorageTest extends \PHPUnit_Framework_TestCase
8
{
9
10
    public $cacheStorage;
11
12
    public function setUp()
13
    {
14
        $this->cacheStorage = new NullStorage();
15
    }
16
17
    public function testHas(){
18
        $this->assertEquals($this->cacheStorage->has('key', 'value'), null);
0 ignored issues
show
Unused Code introduced by
The call to NullStorage::has() has too many arguments starting with 'value'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
19
    }
20
21
    public function testSet(){
22
        $this->assertEquals($this->cacheStorage->set('key', 'value', 10), null);
23
    }
24
25
    public function testGet(){
26
        $this->assertEquals($this->cacheStorage->get('key'), null);
27
    }
28
29
    public function testDelete(){
30
        $this->assertEquals($this->cacheStorage->delete('key'), null);
31
    }
32
    
33
}
34