Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | function test_helper() { |
||
|
|||
22 | $data = new Data(); |
||
23 | |||
24 | $helper = new DataCreditCardHelper( $data ); |
||
25 | |||
26 | $ed = new DateTime(); |
||
27 | |||
28 | $helper |
||
29 | ->set_number( '378282246310005' ) |
||
30 | ->set_expiration_date( $ed ) |
||
31 | ->set_security_code( '123' ); |
||
32 | |||
33 | $this->assertEquals( array( |
||
34 | 'CARDNO' => '378282246310005', |
||
35 | 'ED' => $ed->format( Ingenico::EXPIRATION_DATE_FORMAT ), |
||
36 | 'CVC' => '123', |
||
37 | ), $data->get_fields() ); |
||
38 | } |
||
40 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.