Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class PaymentResponseTest extends \WP_UnitTestCase { |
||
21 | /** |
||
22 | * Test. |
||
23 | */ |
||
24 | public function test() { |
||
25 | $response_header = new ResponseHeader( '2020-11-10T18:31:20Z' ); |
||
26 | |||
27 | $payment_response = new PaymentResponse( 2, 'Pending', $response_header ); |
||
28 | |||
29 | $this->assertInstanceOf( ResponseHeader::class, $response_header ); |
||
30 | $this->assertInstanceOf( PaymentResponse::class, $payment_response ); |
||
31 | $this->assertEquals( ResultCode::PENDING, $payment_response->get_result() ); |
||
32 | $this->assertEquals( 'Pending', $payment_response->get_description() ); |
||
33 | $this->assertEquals( $response_header, $payment_response->get_header() ); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Test from JSON. |
||
38 | */ |
||
39 | public function test_from_json() { |
||
47 | } |
||
48 | } |
||
49 |