wp-pay-gateways /
ogone
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Pronamic\WordPress\Pay\Gateways\Ingenico; |
||
| 4 | |||
| 5 | use Pronamic\WordPress\Pay\Payments\PaymentStatus as Core_Statuses; |
||
|
0 ignored issues
–
show
|
|||
| 6 | |||
| 7 | /** |
||
| 8 | * Title: Ogone statuses constants tests |
||
| 9 | * Description: |
||
| 10 | * Copyright: 2005-2019 Pronamic |
||
| 11 | * Company: Pronamic |
||
| 12 | * |
||
| 13 | * @author Remco Tolsma |
||
| 14 | * @version 2.0.0 |
||
| 15 | */ |
||
| 16 | class StatusesTest extends \PHPUnit_Framework_TestCase { |
||
| 17 | /** |
||
| 18 | * Test transform. |
||
| 19 | * |
||
| 20 | * @dataProvider status_matrix_provider |
||
| 21 | */ |
||
| 22 | public function test_transform( $ogone_status, $expected ) { |
||
| 23 | $status = Statuses::transform( $ogone_status ); |
||
| 24 | |||
| 25 | $this->assertEquals( $expected, $status ); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Stats matrix provider. |
||
| 30 | * |
||
| 31 | * @return array |
||
| 32 | */ |
||
| 33 | public function status_matrix_provider() { |
||
| 34 | return array( |
||
| 35 | // Failture |
||
| 36 | array( Statuses::INCOMPLETE_OR_INVALID, Core_Statuses::FAILURE ), |
||
| 37 | array( Statuses::AUTHORIZATION_REFUSED, Core_Statuses::FAILURE ), |
||
| 38 | array( Statuses::AUTHOR_DELETION_REFUSED, Core_Statuses::FAILURE ), |
||
| 39 | array( Statuses::PAYMENT_DELETION_REFUSED, Core_Statuses::FAILURE ), |
||
| 40 | array( Statuses::REFUND_REFUSED, Core_Statuses::FAILURE ), |
||
| 41 | array( Statuses::PAYMENT_DECLIEND_BY_THE_ACQUIRER, Core_Statuses::FAILURE ), |
||
| 42 | array( Statuses::PAYMENT_REFUSED, Core_Statuses::FAILURE ), |
||
| 43 | array( Statuses::REFUND_DECLINED_BY_THE_ACQUIRER, Core_Statuses::FAILURE ), |
||
| 44 | // Cancelled |
||
| 45 | array( Statuses::CANCELLED_BY_CLIENT, Core_Statuses::CANCELLED ), |
||
| 46 | array( Statuses::AUTHORIZED_AND_CANCELLED, Core_Statuses::CANCELLED ), |
||
| 47 | array( Statuses::AUTHORIZED_AND_CANCELLED_64, Core_Statuses::CANCELLED ), |
||
| 48 | // Open |
||
| 49 | array( Statuses::ORDER_STORED, Core_Statuses::OPEN ), |
||
| 50 | array( Statuses::STORED_WAITING_EXTERNAL_RESULT, Core_Statuses::OPEN ), |
||
| 51 | array( Statuses::WAITING_CLIENT_PAYMENT, Core_Statuses::OPEN ), |
||
| 52 | array( Statuses::AUHTORIZED_WAITING_EXTERNAL_RESULT, Core_Statuses::OPEN ), |
||
| 53 | array( Statuses::AUTHORIZATION_WAITING, Core_Statuses::OPEN ), |
||
| 54 | array( Statuses::AUTHORIZATION_NOT_KNOWN, Core_Statuses::OPEN ), |
||
| 55 | array( Statuses::STAND_BY, Core_Statuses::OPEN ), |
||
| 56 | array( Statuses::OK_WITH_SCHEDULED_PAYMENTS, Core_Statuses::OPEN ), |
||
| 57 | array( Statuses::ERROR_IN_SCHEDULED_PAYMENTS, Core_Statuses::OPEN ), |
||
| 58 | array( Statuses::AUHORIZ_TO_GET_MANUALLY, Core_Statuses::OPEN ), |
||
| 59 | array( Statuses::AUTHOR_DELETION_WAITING, Core_Statuses::OPEN ), |
||
| 60 | array( Statuses::AUTHOR_DELETION_UNCERTAIN, Core_Statuses::OPEN ), |
||
| 61 | array( Statuses::PAYMENT_DELETION_PENDING, Core_Statuses::OPEN ), |
||
| 62 | array( Statuses::PAYMENT_DELETION_UNCERTAIN, Core_Statuses::OPEN ), |
||
| 63 | array( Statuses::PAYMENT_DELETED_74, Core_Statuses::OPEN ), |
||
| 64 | array( Statuses::DELETION_PROCESSED_BY_MERCHANT, Core_Statuses::OPEN ), |
||
| 65 | array( Statuses::REFUND_PENDING, Core_Statuses::OPEN ), |
||
| 66 | array( Statuses::REFUND_UNCERTAIN, Core_Statuses::OPEN ), |
||
| 67 | array( Statuses::PAYMENT_UNCERTAIN, Core_Statuses::OPEN ), |
||
| 68 | array( Statuses::PAYMENT_PROCESSING, Core_Statuses::OPEN ), |
||
| 69 | array( Statuses::BEING_PROCESSED, Core_Statuses::OPEN ), |
||
| 70 | // Success |
||
| 71 | array( Statuses::AUTHORIZED, Core_Statuses::SUCCESS ), |
||
| 72 | array( Statuses::PAYMENT_DELETED, Core_Statuses::SUCCESS ), |
||
| 73 | array( Statuses::REFUND, Core_Statuses::SUCCESS ), |
||
| 74 | array( Statuses::REFUND_PROCESSED_BY_MERCHANT, Core_Statuses::SUCCESS ), |
||
| 75 | array( Statuses::PAYMENT_REQUESTED, Core_Statuses::SUCCESS ), |
||
| 76 | array( Statuses::PAYMENT_PROCESSED_BY_MERCHANT, Core_Statuses::SUCCESS ), |
||
| 77 | // Other |
||
| 78 | array( 'not existing status', null ), |
||
| 79 | ); |
||
| 80 | } |
||
| 81 | } |
||
| 82 |
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