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 1212use Magento \Framework \App \ObjectManager ;
1313use Magento \Framework \Exception \InputException ;
1414use Magento \Framework \Exception \NoSuchEntityException ;
15+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
1516use Magento \Sales \Api \Data \OrderExtensionFactory ;
1617use Magento \Sales \Api \Data \OrderExtensionInterface ;
1718use Magento \Sales \Api \Data \OrderInterface ;
2930 *
3031 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3132 */
32- class OrderRepository implements \Magento \Sales \Api \OrderRepositoryInterface
33+ class OrderRepository implements \Magento \Sales \Api \OrderRepositoryInterface, ResetAfterRequestInterface
3334{
3435 /**
3536 * @var Metadata
@@ -347,4 +348,12 @@ protected function addFilterGroupToCollection(
347348 $ searchResult ->addFieldToFilter ($ fields , $ conditions );
348349 }
349350 }
351+
352+ /**
353+ * @inheritDoc
354+ */
355+ public function _resetState (): void
356+ {
357+ $ this ->registry = [];
358+ }
350359}
Original file line number Diff line number Diff line change 1111 */
1212namespace Magento \Tax \Model ;
1313
14+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
1415use Magento \Store \Model \Store ;
1516
1617/**
1718 * Class to set flags for tax display setting
1819 *
1920 * @SuppressWarnings(PHPMD.ExcessivePublicCount)
2021 */
21- class Config
22+ class Config implements ResetAfterRequestInterface
2223{
2324 /**
2425 * Tax notifications
@@ -952,4 +953,14 @@ public function needPriceConversion($store = null)
952953 }
953954 return $ res ;
954955 }
956+
957+ /**
958+ * @inheritDoc
959+ */
960+ public function _resetState (): void
961+ {
962+ $ this ->_priceIncludesTax = null ;
963+ $ this ->_shippingPriceIncludeTax = null ;
964+ $ this ->_needUseShippingExcludeTax = false ;
965+ }
955966}
Original file line number Diff line number Diff line change 77
88namespace Magento \GraphQl \Sales ;
99
10+ use Magento \Customer \Model \ResourceModel \CustomerRepository ;
1011use Magento \Framework \Exception \NoSuchEntityException ;
1112use Magento \Integration \Api \CustomerTokenServiceInterface ;
1213use Magento \Quote \Api \CartRepositoryInterface ;
14+ use Magento \Quote \Model \QuoteRepository ;
1315use Magento \TestFramework \Helper \Bootstrap ;
16+ use Magento \TestFramework \ObjectManager ;
1417use Magento \TestFramework \TestCase \GraphQlAbstract ;
1518
1619/**
@@ -185,6 +188,12 @@ public function testReorderWithLowStock()
185188 $ expectedResponse ['cart ' ]['items ' ][0 ]['quantity ' ] = 20 ;
186189
187190 $ 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 );
188197 }
189198
190199 /**
You can’t perform that action at this time.
0 commit comments