wp-pay-gateways /
ogone
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Pronamic\WordPress\Pay\Gateways\Ingenico; |
||||
| 4 | |||||
| 5 | use DateTime; |
||||
| 6 | |||||
| 7 | /** |
||||
| 8 | * Title: Ogone data default helper class test |
||||
| 9 | * Description: |
||||
| 10 | * Copyright: 2005-2019 Pronamic |
||||
| 11 | * Company: Pronamic |
||||
| 12 | * |
||||
| 13 | * @author Remco Tolsma |
||||
| 14 | * @version 2.0.0 |
||||
| 15 | * @since 1.1.0 |
||||
| 16 | */ |
||||
| 17 | class DataCreditCardHelperTest extends \WP_UnitTestCase { |
||||
|
0 ignored issues
–
show
|
|||||
| 18 | /** |
||||
| 19 | * Test helper |
||||
| 20 | */ |
||||
| 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' ) |
||||
|
0 ignored issues
–
show
'378282246310005' of type string is incompatible with the type integer expected by parameter $number of Pronamic\WordPress\Pay\G...ardHelper::set_number().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 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 | } |
||||
| 39 | } |
||||
| 40 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths