DnsTest   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 testValidate() 0 14 1
1
<?php
2
namespace Redaxscript\Tests\Validator;
3
4
use Redaxscript\Tests\TestCaseAbstract;
5
use Redaxscript\Validator;
6
7
/**
8
 * DnsTest
9
 *
10
 * @since 2.2.0
11
 *
12
 * @package Redaxscript
13
 * @category Tests
14
 * @author Henry Ruhs
15
 * @author Sven Weingartner
16
 *
17
 * @covers Redaxscript\Validator\Dns
18
 */
19
20
class DnsTest extends TestCaseAbstract
21
{
22
	/**
23
	 * testValidate
24
	 *
25
	 * @since 2.2.0
26
	 *
27
	 * @param string $host
28
	 * @param string $type
29
	 * @param bool $expect
30
	 *
31
	 * @dataProvider providerAutoloader
32
	 */
33
34
	public function testValidate(string $host = null, string $type = null, bool $expect = null) : void
35
	{
36
		/* setup */
37
38
		$validator = new Validator\Dns();
39
40
		/* actual */
41
42
		$actual = $validator->validate($host, $type);
43
44
		/* compare */
45
46
		$this->assertEquals($expect, $actual);
47
	}
48
}
49