TransactionResponseTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 12
c 2
b 0
f 0
dl 0
loc 19
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test() 0 15 1
1
<?php
2
/**
3
 * Transaction Response Test
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2022 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Gateways\Payvision
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Payvision;
12
13
/**
14
 * Transaction Response Test
15
 *
16
 * @author  Remco Tolsma
17
 * @version 1.1.0
18
 * @since   1.0.0
19
 */
20
class TransactionResponseTest extends \WP_UnitTestCase {
21
	/**
22
	 * Test.
23
	 */
24
	public function test() {
25
		$transaction_response = new TransactionResponse(
26
			'payment',
27
			'3d40de42-d70f-49e9-8219-a999247945be',
28
			'0948143a-3f04-4627-94a7-e807fc1949fb',
29
			1,
30
			'EUR'
31
		);
32
33
		$this->assertInstanceOf( TransactionResponse::class, $transaction_response );
34
		$this->assertEquals( 'payment', $transaction_response->get_action() );
35
		$this->assertEquals( '3d40de42-d70f-49e9-8219-a999247945be', $transaction_response->get_id() );
36
		$this->assertEquals( '0948143a-3f04-4627-94a7-e807fc1949fb', $transaction_response->get_tracking_code() );
37
		$this->assertEquals( 1, $transaction_response->get_amount() );
38
		$this->assertEquals( 'EUR', $transaction_response->get_currency_code() );
39
	}
40
}
41