Test Failed
Push — develop ( fd928b...40893b )
by Remco
04:14
created

SignatureTest::test_signature()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 12
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\MultiSafepay;
4
5
use WP_UnitTestCase;
6
7
/**
8
 * Test signature
9
 *
10
 * @link http://pronamic.nl/wp-content/uploads/2013/04/BPE-3.0-Gateway-HTML.1.02.pdf
11
 * @author remco
12
 */
13
class SignatureTest extends WP_UnitTestCase {
14
	/**
15
	 * Test signature.
16
	 */
17
	public function test_signature() {
18
		$amount         = 5000;
19
		$currency       = 'EUR';
20
		$account        = 'Test';
21
		$site_id        = '1234';
22
		$transaction_id = '1234567890';
23
24
		$signature = Signature::generate( $amount, $currency, $account, $site_id, $transaction_id );
25
26
		$expected = 'af90311cf82cbf9bb4fcda5a54005b92';
27
28
		$this->assertEquals( $expected, $signature );
29
	}
30
}
31