CacheIntegrationTestCase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 29
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testStorageAndRetrieval() 0 23 1
1
<?php
2
3
namespace Onoi\Cache\Tests\Integration;
4
5
/**
6
 * @group onoi-cache
7
 *
8
 * @license GNU GPL v2+
9
 * @since 1.2
10
 *
11
 * @author mwjames
12
 */
13
abstract class CacheIntegrationTestCase extends \PHPUnit_Framework_TestCase {
14
15
	protected $cache;
16
17
	public function testStorageAndRetrieval() {
18
19
		$this->assertFalse(
20
			$this->cache->contains( 'Foo' )
21
		);
22
23
		$this->cache->save( 'Foo', 'Bar', 42 );
24
25
		$this->assertTrue(
26
			$this->cache->contains( 'Foo' )
27
		);
28
29
		$this->assertEquals(
30
			'Bar',
31
			$this->cache->fetch( 'Foo' )
32
		);
33
34
		$this->cache->delete( 'Foo' );
35
36
		$this->assertFalse(
37
			$this->cache->contains( 'Foo' )
38
		);
39
	}
40
41
}
42