UrlTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 28
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
 * UrlTest
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\Url
18
 */
19
20
class UrlTest extends TestCaseAbstract
21
{
22
	/**
23
	 * testValidate
24
	 *
25
	 * @since 2.2.0
26
	 *
27
	 * @param string $url
28
	 * @param bool $expect
29
	 *
30
	 * @dataProvider providerAutoloader
31
	 */
32
33
	public function testValidate(string $url = null, bool $expect = null) : void
34
	{
35
		/* setup */
36
37
		$validator = new Validator\Url();
38
39
		/* actual */
40
41
		$actual = $validator->validate($url);
42
43
		/* compare */
44
45
		$this->assertEquals($expect, $actual);
46
	}
47
}
48