11
11
use Magento \Framework \Serialize \SerializerInterface ;
12
12
use Magento \GraphQl \Controller \GraphQl ;
13
13
use Magento \GraphQl \Quote \GetMaskedQuoteIdByReservedOrderId ;
14
- use Magento \Payment \Gateway \Command \CommandPoolInterface ;
15
- use Magento \Sales \Model \Order ;
16
14
use Magento \TestFramework \Helper \Bootstrap ;
17
15
use Magento \Framework \HTTP \ZendClient ;
18
16
use Magento \Framework \HTTP \ZendClientFactory ;
@@ -86,6 +84,7 @@ protected function setUp() : void
86
84
* @magentoConfigFixture default_store payment/authorizenet_acceptjs/login someusername
87
85
* @magentoConfigFixture default_store payment/authorizenet_acceptjs/trans_key somepassword
88
86
* @magentoConfigFixture default_store payment/authorizenet_acceptjs/trans_signature_key abc
87
+ * @magentoDataFixture Magento/Sales/_files/default_rollback.php
89
88
* @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product_authorizenet.php
90
89
* @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php
91
90
* @magentoDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php
@@ -137,15 +136,6 @@ public function testDispatchToPlaceAnOrderWithAuthorizenet(): void
137
136
->addHeaders (['Content-Type ' => 'application/json ' ]);
138
137
$ this ->request ->setHeaders ($ headers );
139
138
140
- /** @var CommandPoolInterface $commandPool */
141
- $ commandPool = $ this ->objectManager ->get ('AuthorizenetAcceptjsCommandPool ' );
142
- $ command = $ commandPool ->get ('authorize ' );
143
- /** @var Order $order */
144
- $ fullOrder = include __DIR__ . '/../../../_files/place_order_guest_authorizenet.php ' ;
145
-
146
- $ payment = $ fullOrder ->getPayment ();
147
- $ paymentDO = $ this ->paymentFactory ->create ($ payment );
148
-
149
139
$ expectedRequest = include __DIR__ . '/../../../_files/request_authorize.php ' ;
150
140
$ authorizeResponse = include __DIR__ . '/../../../_files/response_authorize.php ' ;
151
141
@@ -154,11 +144,6 @@ public function testDispatchToPlaceAnOrderWithAuthorizenet(): void
154
144
155
145
$ this ->responseMock ->method ('getBody ' )->willReturn (json_encode ($ authorizeResponse ));
156
146
157
- $ command ->execute ([
158
- 'payment ' => $ paymentDO ,
159
- 'amount ' => 100.00
160
- ]);
161
-
162
147
$ response = $ this ->graphql ->dispatch ($ this ->request );
163
148
$ responseData = $ this ->jsonSerializer ->unserialize ($ response ->getContent ());
164
149
0 commit comments