Completed
Push — master ( 432a29...e6b984 )
by Henry
06:52
created

DetectorTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Redaxscript\Tests\Bootstrap;
3
4
use Redaxscript\Bootstrap;
5
use Redaxscript\Tests\TestCaseAbstract;
6
7
/**
8
 * DetectorTest
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\Detector
18
 *
19
 * @runTestsInSeparateProcesses
20
 */
21
22
class DetectorTest extends TestCaseAbstract
23
{
24
	/**
25
	 * setUp
26
	 *
27
	 * @since 5.0.0
28
	 */
29
30
	public function setUp() : void
31
	{
32
		parent::setUp();
33
		$this->_request->init();
34
	}
35
36
	/**
37
	 * testDetector
38
	 *
39
	 * @since 3.1.0
40
	 *
41
	 * @param array $expectArray
42
	 *
43
	 * @dataProvider providerAutoloader
44
	 */
45
46
	public function testDetector(array $expectArray = []) : void
47
	{
48
		/* setup */
49
50
		new Bootstrap\Detector($this->_registry, $this->_request);
51
52
		/* actual */
53
54
		$actualArray =
55
		[
56
			'language' => $this->_registry->get('language'),
57
			'template' => $this->_registry->get('template')
58
		];
59
60
		/* compare */
61
62
		$this->assertEquals($expectArray, $actualArray);
63
	}
64
}
65