File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
dev/tests/api-functional/testsuite/Magento/GraphQl/Sales Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 12
12
use Magento \Framework \App \ObjectManager ;
13
13
use Magento \Framework \Exception \InputException ;
14
14
use Magento \Framework \Exception \NoSuchEntityException ;
15
+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
15
16
use Magento \Sales \Api \Data \OrderExtensionFactory ;
16
17
use Magento \Sales \Api \Data \OrderExtensionInterface ;
17
18
use Magento \Sales \Api \Data \OrderInterface ;
29
30
*
30
31
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
31
32
*/
32
- class OrderRepository implements \Magento \Sales \Api \OrderRepositoryInterface
33
+ class OrderRepository implements \Magento \Sales \Api \OrderRepositoryInterface, ResetAfterRequestInterface
33
34
{
34
35
/**
35
36
* @var Metadata
@@ -347,4 +348,12 @@ protected function addFilterGroupToCollection(
347
348
$ searchResult ->addFieldToFilter ($ fields , $ conditions );
348
349
}
349
350
}
351
+
352
+ /**
353
+ * @inheritDoc
354
+ */
355
+ public function _resetState (): void
356
+ {
357
+ $ this ->registry = [];
358
+ }
350
359
}
Original file line number Diff line number Diff line change 11
11
*/
12
12
namespace Magento \Tax \Model ;
13
13
14
+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
14
15
use Magento \Store \Model \Store ;
15
16
16
17
/**
17
18
* Class to set flags for tax display setting
18
19
*
19
20
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
20
21
*/
21
- class Config
22
+ class Config implements ResetAfterRequestInterface
22
23
{
23
24
/**
24
25
* Tax notifications
@@ -952,4 +953,14 @@ public function needPriceConversion($store = null)
952
953
}
953
954
return $ res ;
954
955
}
956
+
957
+ /**
958
+ * @inheritDoc
959
+ */
960
+ public function _resetState (): void
961
+ {
962
+ $ this ->_priceIncludesTax = null ;
963
+ $ this ->_shippingPriceIncludeTax = null ;
964
+ $ this ->_needUseShippingExcludeTax = false ;
965
+ }
955
966
}
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \GraphQl \Sales ;
9
9
10
+ use Magento \Customer \Model \ResourceModel \CustomerRepository ;
10
11
use Magento \Framework \Exception \NoSuchEntityException ;
11
12
use Magento \Integration \Api \CustomerTokenServiceInterface ;
12
13
use Magento \Quote \Api \CartRepositoryInterface ;
14
+ use Magento \Quote \Model \QuoteRepository ;
13
15
use Magento \TestFramework \Helper \Bootstrap ;
16
+ use Magento \TestFramework \ObjectManager ;
14
17
use Magento \TestFramework \TestCase \GraphQlAbstract ;
15
18
16
19
/**
@@ -185,6 +188,12 @@ public function testReorderWithLowStock()
185
188
$ expectedResponse ['cart ' ]['items ' ][0 ]['quantity ' ] = 20 ;
186
189
187
190
$ this ->assertResponseFields ($ response ['reorderItems ' ], $ expectedResponse );
191
+ $ customer = ObjectManager::getInstance ()->get (CustomerRepository::class)
192
+ ->get (self ::CUSTOMER_EMAIL );
193
+ $ quoteRepository = ObjectManager::getInstance ()->get (QuoteRepository::class);
194
+ $ quote = $ quoteRepository ->getActiveForCustomer ($ customer ->getId ());
195
+ $ quote ->setIsActive (false );
196
+ $ quoteRepository ->save ($ quote );
188
197
}
189
198
190
199
/**
You can’t perform that action at this time.
0 commit comments