Total Complexity | 3 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class OrderResponseParser0Test extends \WP_UnitTestCase { |
||
8 | /** |
||
9 | * Test initialize. |
||
10 | * |
||
11 | * @return SimpleXMLElement |
||
|
|||
12 | */ |
||
13 | public function test_init() { |
||
14 | $filename = dirname( dirname( dirname( __FILE__ ) ) ) . '/Mock/response-status-0-50001123.xml'; |
||
15 | |||
16 | $simplexml = simplexml_load_file( $filename ); |
||
17 | |||
18 | $this->assertInstanceOf( 'SimpleXMLElement', $simplexml ); |
||
19 | |||
20 | return $simplexml; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Test parser. |
||
25 | * |
||
26 | * @depends test_init |
||
27 | * |
||
28 | * @param SimpleXMLElement $simplexml |
||
29 | * |
||
30 | * @return OrderResponse |
||
31 | */ |
||
32 | public function test_parser( $simplexml ) { |
||
33 | $order_response = OrderResponseParser::parse( $simplexml ); |
||
34 | |||
35 | $this->assertInstanceOf( 'Pronamic\WordPress\Pay\Gateways\Ingenico\DirectLink\OrderResponse', $order_response ); |
||
36 | |||
37 | return $order_response; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Test values. |
||
42 | * |
||
43 | * @depends test_parser |
||
44 | * |
||
45 | * @param OrderResponse $order_response |
||
46 | */ |
||
47 | public function test_values( $order_response ) { |
||
56 | } |
||
57 | } |
||
58 |