ConfigTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_config() 0 12 1
1
<?php
2
/**
3
 * Config 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\Buckaroo
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Buckaroo;
12
13
use Pronamic\WordPress\Pay\Core\Gateway as Core_Gateway;
14
15
/**
16
 * Config test
17
 *
18
 * @author  Reüel van der Steege
19
 * @version unreleased
20
 * @since   unreleased
21
 */
22
class ConfigTest extends \WP_UnitTestCase {
23
	/**
24
	 * Test config.
25
	 */
26
	public function test_config() {
27
		$config = new Config();
28
29
		$config->website_key       = 'jpERWpuvUK';
30
		$config->secret_key        = 'FA82C3F2EE964729377A172F7564F372';
31
		$config->excluded_services = '';
32
		$config->invoice_number    = '{payment_id}';
33
34
		$this->assertEquals( 'jpERWpuvUK', $config->get_website_key() );
35
		$this->assertEquals( 'FA82C3F2EE964729377A172F7564F372', $config->get_secret_key() );
36
		$this->assertEquals( '', $config->get_excluded_services() );
37
		$this->assertEquals( '{payment_id}', $config->get_invoice_number() );
38
	}
39
}
40