Failed Conditions
Push — master ( a09dd1...618777 )
by Remco
04:53 queued 10s
created

PaymentMeanBrandListTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_constructor() 0 11 1
A test_add_payment_method() 0 8 1
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\OmniKassa;
4
5
use WP_UnitTestCase;
6
7
/**
8
 * Title: OmniKassa payment mean brand list test
9
 * Description:
10
 * Copyright: 2005-2019 Pronamic
11
 * Company: Pronamic
12
 *
13
 * @author  Remco Tolsma
14
 * @version 2.0.0
15
 * @since   1.1.0
16
 */
17
class PaymentMeanBrandListTest extends WP_UnitTestCase {
18
	/**
19
	 * Test constructor
20
	 */
21
	public function test_constructor() {
22
		$list = new PaymentMeanBrandList(
23
			array(
24
				Methods::IDEAL,
25
				Methods::INCASSO,
26
			)
27
		);
28
29
		$string = (string) $list;
30
31
		$this->assertEquals( 'IDEAL, INCASSO', $string );
32
	}
33
34
	/**
35
	 * Test add payment method
36
	 */
37
	public function test_add_payment_method() {
38
		$list = new PaymentMeanBrandList();
39
		$list->add_payment_mean_brand( Methods::IDEAL );
40
		$list->add_payment_mean_brand( Methods::INCASSO );
41
42
		$string = (string) $list;
43
44
		$this->assertEquals( 'IDEAL, INCASSO', $string );
45
	}
46
}
47