IDealStartParametersTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test() 0 19 1
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\TargetPay;
4
5
/**
6
 * Title: TargetPay iDEAL start parameters test
7
 * Description:
8
 * Copyright: 2005-2021 Pronamic
9
 * Company: Pronamic
10
 *
11
 * @author  Remco Tolsma
12
 * @version 2.0.0
13
 * @since   1.0.0
14
 */
15
class IDealStartParametersTest extends \PHPUnit_Framework_TestCase {
16
	/**
17
	 * Test iDEAL start parameters.
18
	 */
19
	public function test() {
20
		$parameters                    = new IDealStartParameters();
21
		$parameters->rtlo              = '12345';
22
		$parameters->bank              = 'test';
23
		$parameters->description       = 'Description';
24
		$parameters->amount            = '100';
25
		$parameters->return_url        = 'http://example.com/';
26
		$parameters->report_url        = 'http://example.com/';
27
		$parameters->cinfo_in_callback = true;
28
29
		$array = $parameters->get_array();
30
31
		$this->assertArrayHasKey( 'rtlo', $array );
32
		$this->assertArrayHasKey( 'bank', $array );
33
		$this->assertArrayHasKey( 'description', $array );
34
		$this->assertArrayHasKey( 'amount', $array );
35
		$this->assertArrayHasKey( 'returnurl', $array );
36
		$this->assertArrayHasKey( 'reporturl', $array );
37
		$this->assertArrayHasKey( 'cinfo_in_callback', $array );
38
	}
39
}
40