ParamTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testListParamProcessingWithEmptyListAsDefault() 0 9 1
1
<?php
2
3
namespace ParamProcessor\Tests\Unit;
4
5
use ParamProcessor\Options;
6
use ParamProcessor\PackagePrivate\Param;
7
use ParamProcessor\ParamDefinition;
8
use PHPUnit\Framework\TestCase;
9
10
/**
11
 * @covers \ParamProcessor\PackagePrivate\Param
12
 *
13
 * @licence GNU GPL v2+
14
 * @author Jeroen De Dauw < [email protected] >
15
 */
16
class ParamTest extends TestCase {
17
18
	public function testListParamProcessingWithEmptyListAsDefault() {
19
		$definition = new ParamDefinition( 'string', 'something', [] );
20
		$definitions = [ $definition ];
21
22
		$param = new Param( $definition );
23
		$param->process( $definitions, [], new Options() );
24
25
		$this->assertSame( [], $param->getValue() );
26
	}
27
28
}
29