SearchFormTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

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