ZendCacheIntegrationTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 18 2
1
<?php
2
3
namespace Onoi\Cache\Tests\Integration;
4
5
use Zend\Cache\StorageFactory;
6
use Onoi\Cache\ZendCache;
7
8
/**
9
 * @group onoi-cache
10
 *
11
 * @license GNU GPL v2+
12
 * @since 1.1
13
 *
14
 * @author mwjames
15
 */
16
class ZendCacheIntegrationTest extends CacheIntegrationTestCase {
17
18
	protected $cache;
19
20
	protected function setUp() {
21
22
		if ( !class_exists( '\Zend\Cache\StorageFactory' ) ) {
23
			$this->markTestSkipped( 'StorageFactory is not available' );
24
		}
25
26
		$memoryCache = StorageFactory::factory( array(
27
			'adapter' => array(
28
				'name'    => 'memory',
29
				'options' => array( 'ttl' => 100 ),
30
			),
31
				'plugins' => array(
32
				'exception_handler' => array( 'throw_exceptions' => false ),
33
			),
34
		) );
35
36
		$this->cache = new ZendCache( $memoryCache );
37
	}
38
39
}
40