Conditions | 1 |
Paths | 1 |
Total Lines | 41 |
Code Lines | 33 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function test_helper() { |
||
20 | $data = new Data(); |
||
21 | |||
22 | $helper = new DataGeneralHelper( $data ); |
||
23 | |||
24 | $pmlist = new PaymentMethodsList( |
||
25 | array( |
||
26 | Brands::VISA, |
||
27 | Brands::MASTERCARD, |
||
28 | Brands::AMERICAN_EXPRESS, |
||
29 | ) |
||
30 | ); |
||
31 | |||
32 | $helper |
||
33 | ->set_psp_id( 'test' ) |
||
34 | ->set_order_id( '1234' ) |
||
35 | ->set_order_description( 'order description' ) |
||
36 | ->set_amount( 1050 ) |
||
37 | ->set_currency( 'EUR' ) |
||
38 | ->set_customer_name( 'Mr. Test' ) |
||
39 | ->set_email( '[email protected]' ) |
||
40 | ->set_language( 'nl' ) |
||
41 | ->set_payment_method( PaymentMethods::IDEAL ) |
||
42 | ->set_payment_methods_list( $pmlist ) |
||
43 | ->set_brand( Brands::IDEAL ); |
||
44 | |||
45 | $this->assertEquals( |
||
46 | array( |
||
47 | 'PSPID' => 'test', |
||
48 | 'ORDERID' => '1234', |
||
49 | 'COM' => 'order description', |
||
50 | 'AMOUNT' => 1050, |
||
51 | 'CURRENCY' => 'EUR', |
||
52 | 'CN' => 'Mr. Test', |
||
53 | 'EMAIL' => '[email protected]', |
||
54 | 'LANGUAGE' => 'nl', |
||
55 | 'PM' => PaymentMethods::IDEAL, |
||
56 | 'PMLIST' => (string) $pmlist, |
||
57 | 'BRAND' => Brands::IDEAL, |
||
58 | ), |
||
59 | $data->get_fields() |
||
60 | ); |
||
63 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.