Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function test_data() { |
||
12 | $omnikassa = new Client(); |
||
13 | |||
14 | $omnikassa->set_amount( 55 ); |
||
15 | $omnikassa->set_currency_numeric_code( 978 ); |
||
16 | $omnikassa->set_merchant_id( '011223744550001' ); |
||
17 | $omnikassa->set_normal_return_url( 'http://www.normalreturnurl.nl' ); |
||
18 | $omnikassa->set_automatic_response_url( 'http://www.automaticresponseurl.nl' ); |
||
19 | $omnikassa->set_transaction_reference( '534654' ); |
||
20 | $omnikassa->set_order_id( '201208345' ); |
||
21 | $omnikassa->set_key_version( 1 ); |
||
22 | |||
23 | $string = 'amount=55|currencyCode=978|merchantId=011223744550001|normalReturnUrl=http://www.normalreturnurl.nl|automaticResponseUrl=http://www.automaticresponseurl.nl|transactionReference=534654|orderId=201208345|keyVersion=1'; |
||
24 | |||
25 | $expected = Client::parse_piped_string( $string ); |
||
26 | |||
27 | $actual = $omnikassa->get_data_array(); |
||
28 | |||
29 | $this->assertEquals( $expected, $actual ); |
||
30 | } |
||
32 |