File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
app/code/Magento/Braintree/Test/Unit/Gateway/Validator
dev/tests/integration/testsuite/Magento/Checkout/Api Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 14
14
use Magento \Payment \Gateway \Validator \ResultInterfaceFactory ;
15
15
use PHPUnit_Framework_MockObject_MockObject as MockObject ;
16
16
17
+ /**
18
+ * Class GeneralResponseValidatorTest
19
+ */
17
20
class GeneralResponseValidatorTest extends \PHPUnit \Framework \TestCase
18
21
{
19
22
/**
@@ -82,9 +85,11 @@ public function dataProviderTestValidate()
82
85
{
83
86
$ successTransaction = new \stdClass ();
84
87
$ successTransaction ->success = true ;
88
+ $ successTransaction ->status = 'authorized ' ;
85
89
86
90
$ failureTransaction = new \stdClass ();
87
91
$ failureTransaction ->success = false ;
92
+ $ failureTransaction ->status = 'declined ' ;
88
93
$ failureTransaction ->message = 'Transaction was failed. ' ;
89
94
90
95
$ errors = [
@@ -93,10 +98,10 @@ public function dataProviderTestValidate()
93
98
'code ' => 81804 ,
94
99
'attribute ' => 'base ' ,
95
100
'message ' => 'Cannot process transaction. '
96
- ]
101
+ ],
97
102
]
98
103
];
99
- $ errorTransaction = new Error (['errors ' => $ errors ]);
104
+ $ errorTransaction = new Error (['errors ' => $ errors, ' transaction ' => [ ' status ' => ' declined ' ] ]);
100
105
101
106
return [
102
107
[
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public function testSavePaymentInformationAndPlaceOrderWithErrors(
96
96
array_push ($ errors ['errors ' ], ['code ' => $ testErrorCode ]);
97
97
}
98
98
99
- $ response = new Error (['errors ' => $ errors ]);
99
+ $ response = new Error (['errors ' => $ errors, ' transaction ' => [ ' status ' => ' declined ' ] ]);
100
100
101
101
$ this ->client ->method ('placeRequest ' )
102
102
->willReturn (['object ' => $ response ]);
You can’t perform that action at this time.
0 commit comments