Completed
Push — master ( 61a0f7...c014af )
by Henry
09:17
created

SearchTest::testSearch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
namespace Redaxscript\Tests\Validator;
3
4
use Redaxscript\Tests\TestCaseAbstract;
5
use Redaxscript\Validator;
6
7
/**
8
 * SearchTest
9
 *
10
 * @since 4.0.0
11
 *
12
 * @package Redaxscript
13
 * @category Tests
14
 * @author Henry Ruhs
15
 *
16
 * @covers Redaxscript\Validator\Search
17
 */
18
19
class SearchTest extends TestCaseAbstract
20
{
21
	/**
22
	 * testSearch
23
	 *
24
	 * @since 4.0.0
25
	 *
26
	 * @param string $search
27
	 * @param bool $expect
28
	 *
29
	 * @dataProvider providerAutoloader
30
	 */
31
32
	public function testSearch(string $search = null, bool $expect = null) : void
33
	{
34
		/* setup */
35
36
		$validator = new Validator\Search();
37
38
		/* actual */
39
40
		$actual = $validator->validate($search);
41
42
		/* compare */
43
44
		$this->assertEquals($expect, $actual);
45
	}
46
}
47