SignupFieldsParserFunctionTest::testCanConstruct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 11
rs 9.4285
c 1
b 0
f 0
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