InstallFormTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRender() 0 16 1
1
<?php
2
namespace Redaxscript\Tests\View;
3
4
use Redaxscript\Tests\TestCaseAbstract;
5
use Redaxscript\View;
6
7
/**
8
 * InstallFormTest
9
 *
10
 * @since 3.0.0
11
 *
12
 * @package Redaxscript
13
 * @category Tests
14
 * @author Henry Ruhs
15
 *
16
 * @covers Redaxscript\View\InstallForm
17
 * @covers Redaxscript\View\ViewAbstract
18
 */
19
20
class InstallFormTest extends TestCaseAbstract
21
{
22
	/**
23
	 * testRender
24
	 *
25
	 * @since 3.0.0
26
	 *
27
	 * @param array $registryArray
28
	 * @param array $expectArray
29
	 *
30
	 * @dataProvider providerAutoloader
31
	 */
32
33
	public function testRender(array $registryArray = [], array $expectArray = []) : void
34
	{
35
		/* setup */
36
37
		$this->_registry->init($registryArray);
38
		$installForm = new View\InstallForm($this->_registry, $this->_language);
39
40
		/* actual */
41
42
		$actual = $installForm->render();
43
44
		/* compare */
45
46
		$this->assertStringStartsWith($expectArray['start'], $actual);
47
		$this->assertStringEndsWith($expectArray['end'], $actual);
48
	}
49
}
50