SignupFieldsParserFunctionTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanConstruct() 0 11 1
A testExecute() 0 13 1
1
<?php
2
3
namespace SES\Tests;
4
5
use SES\SignupFieldsParserFunction;
6
7
/**
8
 * @covers \SES\SignupFieldsParserFunction
9
 *
10
 * @group semantic-signup
11
 *
12
 * @license GNU GPL v2+
13
 * @since 1.0
14
 *
15
 * @author mwjames
16
 */
17
class SignupFieldsParserFunctionTest extends \PHPUnit_Framework_TestCase {
18
19
	public function testCanConstruct() {
20
21
		$userFieldsCreateTemplate = $this->getMockBuilder( '\SES\UserFieldsCreateTemplate' )
22
			->disableOriginalConstructor()
23
			->getMock();
24
25
		$this->assertInstanceOf(
26
			'\SES\SignupFieldsParserFunction',
27
			new SignupFieldsParserFunction( $userFieldsCreateTemplate )
28
		);
29
	}
30
31
	public function testExecute() {
32
33
		$userFieldsCreateTemplate = $this->getMockBuilder( '\SES\UserFieldsCreateTemplate' )
34
			->disableOriginalConstructor()
35
			->getMock();
36
37
		$instance = new SignupFieldsParserFunction( $userFieldsCreateTemplate );
38
39
		$this->assertInternalType(
40
			'array',
41
			$instance->parse( array() )
42
		);
43
	}
44
45
}
46