| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function test_helper() { |
||
| 20 | $data = new Data(); |
||
| 21 | |||
| 22 | $helper = new DataUrlHelper( $data ); |
||
| 23 | |||
| 24 | $helper |
||
| 25 | ->set_accept_url( 'http://www.example.com/payment/accepted/' ) |
||
| 26 | ->set_cancel_url( 'http://www.example.com/payment/cancelled/' ) |
||
| 27 | ->set_exception_url( 'http://www.example.com/payment/exception/' ) |
||
| 28 | ->set_decline_url( 'http://www.example.com/payment/declined/' ) |
||
| 29 | ->set_home_url( 'http://www.example.com/' ) |
||
| 30 | ->set_back_url( 'http://www.example.com/payment/' ); |
||
| 31 | |||
| 32 | $this->assertEquals( |
||
| 33 | array( |
||
| 34 | 'ACCEPTURL' => 'http://www.example.com/payment/accepted/', |
||
| 35 | 'CANCELURL' => 'http://www.example.com/payment/cancelled/', |
||
| 36 | 'EXCEPTIONURL' => 'http://www.example.com/payment/exception/', |
||
| 37 | 'DECLINEURL' => 'http://www.example.com/payment/declined/', |
||
| 38 | 'home' => 'http://www.example.com/', |
||
| 39 | 'backurl' => 'http://www.example.com/payment/', |
||
| 40 | ), |
||
| 41 | $data->get_fields() |
||
| 42 | ); |
||
| 45 |