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

NumberTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testNumber() 0 14 1
1
<?php
2
namespace Redaxscript\Tests\Filter;
3
4
use Redaxscript\Filter;
5
use Redaxscript\Tests\TestCaseAbstract;
6
7
/**
8
 * NumberTest
9
 *
10
 * @since 2.2.0
11
 *
12
 * @package Redaxscript
13
 * @category Tests
14
 * @author Henry Ruhs
15
 *
16
 * @covers Redaxscript\Filter\Number
17
 */
18
19
class NumberTest extends TestCaseAbstract
20
{
21
	/**
22
	 * testNumber
23
	 *
24
	 * @since 2.2.0
25
	 *
26
	 * @param string $number
27
	 * @param int $expect
28
	 *
29
	 * @dataProvider providerAutoloader
30
	 */
31
32
	public function testNumber(string $number = null, int $expect = null) : void
33
	{
34
		/* setup */
35
36
		$filter = new Filter\Number();
37
38
		/* actual */
39
40
		$actual = $filter->sanitize($number);
41
42
		/* compare */
43
44
		$this->assertEquals($expect, $actual);
45
	}
46
}
47