| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function test() { |
||
| 25 | $header = new RequestHeader( '123456' ); |
||
| 26 | |||
| 27 | $transaction = new Transaction( '1', 50, 'EUR', '12345678' ); |
||
|
|
|||
| 28 | |||
| 29 | $payment_request = new PaymentRequest( $header, $transaction ); |
||
| 30 | |||
| 31 | $bank = new BankDetails(); |
||
| 32 | $bank->set_issuer_id( IssuerIdIDeal::ABN_AMRO ); |
||
| 33 | |||
| 34 | $payment_request->set_bank( $bank ); |
||
| 35 | |||
| 36 | $this->assertInstanceOf( PaymentRequest::class, $payment_request ); |
||
| 37 | |||
| 38 | // JSON. |
||
| 39 | $json_file = __DIR__ . '/../json/payment-request.json'; |
||
| 40 | |||
| 41 | $json_string = \wp_json_encode( $payment_request, \JSON_PRETTY_PRINT ); |
||
| 42 | |||
| 43 | $this->assertJsonStringEqualsJsonFile( $json_file, $json_string ); |
||
| 44 | } |
||
| 46 |