NullCacheTest::testCanConstruct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Onoi\Cache\Tests;
4
5
use Onoi\Cache\NullCache;
6
7
/**
8
 * @covers \Onoi\Cache\NullCache
9
 *
10
 * @group onoi-cache
11
 *
12
 * @license GNU GPL v2+
13
 * @since 1.1
14
 *
15
 * @author mwjames
16
 */
17
class NullCacheTest extends \PHPUnit_Framework_TestCase {
18
19
	public function testCanConstruct() {
20
21
		$this->assertInstanceOf(
22
			'\Onoi\Cache\NullCache',
23
			new NullCache()
24
		);
25
	}
26
27
	public function testGetName() {
28
29
		$instance = new NullCache();
30
31
		$this->assertEmpty(
32
			$instance->getName()
33
		);
34
	}
35
36
	public function testSave() {
37
38
		$instance = new NullCache();
39
		$instance->save( 'Foo', 'Bar', 42 );
40
41
		$this->assertFalse(
42
			$instance->contains( 'Foo' )
43
		);
44
	}
45
46
	public function testDelete() {
47
48
		$instance = new NullCache();
49
		$instance->delete( 'Foo' );
50
51
		$this->assertFalse(
52
			$instance->contains( 'Foo' )
53
		);
54
	}
55
56
	public function testContains() {
57
58
		$instance = new NullCache();
59
60
		$this->assertFalse(
61
			$instance->contains( 'Foo' )
62
		);
63
	}
64
65
	public function testFetch() {
66
67
		$instance = new NullCache();
68
69
		$this->assertFalse(
70
			$instance->fetch( 'Foo' )
71
		);
72
	}
73
74
	public function testGetStats() {
75
76
		$instance = new NullCache();
77
78
		$this->assertEmpty(
79
			$instance->getStats()
80
		);
81
	}
82
83
}
84