CacheTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 35
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCache() 0 20 1
1
<?php
2
namespace Redaxscript\Tests\Bootstrap;
3
4
use Redaxscript\Bootstrap;
5
use Redaxscript\Tests\TestCaseAbstract;
6
7
/**
8
 * CacheTest
9
 *
10
 * @since 3.1.0
11
 *
12
 * @package Redaxscript
13
 * @category Tests
14
 * @author Henry Ruhs
15
 *
16
 * @covers Redaxscript\Bootstrap\BootstrapAbstract
17
 * @covers Redaxscript\Bootstrap\Cache
18
 *
19
 * @runTestsInSeparateProcesses
20
 */
21
22
class CacheTest extends TestCaseAbstract
23
{
24
	/**
25
	 * testCache
26
	 *
27
	 * @since 3.1.0
28
	 *
29
	 * @param array $registryArray
30
	 * @param array $queryArray
31
	 * @param array $expectArray
32
	 *
33
	 * @dataProvider providerAutoloader
34
	 */
35
36
	public function testCache(array $registryArray = [], array $queryArray = [], array $expectArray = []) : void
37
	{
38
		/* setup */
39
40
		$this->_registry->init($registryArray);
41
		$this->_request->setQuery('no-cache', $queryArray['no-cache']);
42
		new Bootstrap\Cache($this->_registry, $this->_request);
43
44
		/* actual */
45
46
		$actualArray =
47
		[
48
			'noAssetCache' => $this->_registry->get('noAssetCache'),
49
			'noPageCache' => $this->_registry->get('noAssetCache')
50
		];
51
52
		/* compare */
53
54
		$this->assertEquals($expectArray, $actualArray);
55
	}
56
}
57