diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCheckoutMutationsStateTest.php b/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCheckoutMutationsStateTest.php new file mode 100644 index 0000000000000..84acf833b3e58 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCheckoutMutationsStateTest.php @@ -0,0 +1,763 @@ +graphQlStateDiff = new GraphQlStateDiff(); + parent::setUp(); + } + + /** + * @inheritDoc + */ + protected function tearDown(): void + { + $this->graphQlStateDiff->tearDown(); + $this->graphQlStateDiff = null; + parent::tearDown(); + } + + + /** + * @return void + */ + public function testCreateEmptyCart() : void + { + $this->graphQlStateDiff->testState( + $this->getEmptyCart(), + [], + [], + [], + 'createEmptyCart', + '"data":{"createEmptyCart":', + $this + ); + } + + + /** + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @return void + */ + public function testAddSimpleProductToCart() + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getAddProductToCartQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId, 'qty' => 1, 'sku' => 'simple_product'], + [], + [], + 'addSimpleProductsToCart', + '"data":{"addSimpleProductsToCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoDataFixture Magento/SalesRule/_files/coupon_code_with_wildcard.php + * @magentoDataFixture Magento/SalesRule/_files/coupon_cart_fixed_discount.php + * @return void + */ + public function testAddCouponToCart() + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getAddCouponToCartQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId, 'couponCode' => '2?ds5!2d'], + ['cartId' => $cartId, 'couponCode' => 'CART_FIXED_DISCOUNT_15'], + [], + 'applyCouponToCart', + '"data":{"applyCouponToCart":', + $this + ); + } + + + /** + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Catalog/_files/virtual_product.php + * @return void + */ + public function testAddVirtualProductToCart() + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getAddVirtualProductToCartQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId, 'quantity' => 1, 'sku' => 'virtual_product'], + [], + [], + 'addVirtualProductsToCart', + '"data":{"addVirtualProductsToCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/Bundle/_files/product.php + * @return void + */ + public function testAddBundleProductToCart() + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getAddBundleProductToCartQuery($cartId, 'bundle-product'); + $this->graphQlStateDiff->testState( + $query, + [], + [], + [], + 'addBundleProductsToCart', + '"data":{"addBundleProductsToCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php + * @return void + */ + public function testAddConfigurableProductToCart(): void + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getAddConfigurableProductToCartQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId, 'quantity' => 2, 'parentSku' => 'configurable', 'childSku' => 'simple_20'], + [], + [], + 'addConfigurableProductsToCart', + '"data":{"addConfigurableProductsToCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/Downloadable/_files/product_downloadable_with_purchased_separately_links.php + * @return void + */ + public function testAddDownloadableProductToCart(): void + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $sku = 'downloadable-product-with-purchased-separately-links'; + $links = $this->getProductsLinks($sku); + $linkId = key($links); + $query = $this->getAddDownloadableProductToCartQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId, 'qty' => 1, 'sku' => $sku, 'linkId' => $linkId], + [], + [], + 'addDownloadableProductsToCart', + '"data":{"addDownloadableProductsToCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @return void + */ + public function testSetShippingAddressOnCart(): void + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getShippingAddressQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId], + [], + [], + 'setShippingAddressesOnCart', + '"data":{"setShippingAddressesOnCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php + * @return void + */ + public function testSetBillingAddressOnCart(): void + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getBillingAddressQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId], + [], + [], + 'setBillingAddressOnCart', + '"data":{"setBillingAddressOnCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php + * @return void + */ + public function testSetShippingMethodsOnCart(): void + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getShippingMethodsQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId, 'shippingMethod' => 'flatrate'], + [], + [], + 'setShippingMethodsOnCart', + '"data":{"setShippingMethodsOnCart":', + $this + ); + } + + /** + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php + */ + public function testSetPaymentMethodOnCart(): void + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getPaymentMethodQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId], + [], + [], + 'setPaymentMethodOnCart', + '"data":{"setPaymentMethodOnCart":', + $this + ); + + } + + /** + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_checkmo_payment_method.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php + */ + public function testPlaceOrder(): void + { + $cartId = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getPlaceOrderQuery(); + $this->graphQlStateDiff->testState( + $query, + ['cartId' => $cartId], + [], + [], + 'placeOrder', + '"data":{"placeOrder":', + $this + ); + + } + + private function getBillingAddressQuery(): string + { + return <<<'QUERY' + mutation($cartId: String!) { + setBillingAddressOnCart( + input: { + cart_id: $cartId + billing_address: { + address: { + firstname: "John" + lastname: "Doe" + street: ["123 Main Street"] + city: "New York" + region: "NY" + postcode: "10001" + country_code: "US" + telephone: "555-555-5555" + } + } + } + ) { + cart { + id + billing_address { + firstname + lastname + street + city + region { + code + label + } + postcode + country { + code + label + } + telephone + } + } + } + } + QUERY; + } + + private function getShippingAddressQuery(): string + { + return <<<'QUERY' + mutation($cartId: String!) { + setShippingAddressesOnCart( + input: { + cart_id: $cartId + shipping_addresses: [ + { + address: { + firstname: "John" + lastname: "Doe" + street: ["123 Main Street"] + city: "New York" + region: "NY" + postcode: "10001" + country_code: "US" + telephone: "555-555-5555" + } + } + ] + } + ) { + cart { + id + shipping_addresses { + firstname + lastname + street + city + region { + code + label + } + postcode + country { + code + label + } + telephone + available_shipping_methods { + carrier_code + method_code + amount { + value + } + } + } + } + } + } + QUERY; + } + /** + * Function returns array of all product's links + * + * @param string $sku + * @return array + */ + private function getProductsLinks(string $sku) : array + { + $result = []; + $productRepository = $this->graphQlStateDiff->getTestObjectManager() + ->get(ProductRepositoryInterface::class); + $product = $productRepository->get($sku, false, null, true); + + foreach ($product->getDownloadableLinks() as $linkObject) { + $result[$linkObject->getLinkId()] = [ + 'title' => $linkObject->getTitle(), + 'link_type' => null, //deprecated field + 'price' => $linkObject->getPrice(), + ]; + } + return $result; + } + + private function getAddDownloadableProductToCartQuery(): string + { + return <<<'MUTATION' + mutation($cartId: String!, $qty: Float!, $sku: String!, $linkId: Int!) { + addDownloadableProductsToCart( + input: { + cart_id: $cartId, + cart_items: [ + { + data: { + quantity: $qty, + sku: $sku + }, + downloadable_product_links: [ + { + link_id: $linkId + } + ] + } + ] + } + ) { + cart { + items { + quantity + ... on DownloadableCartItem { + links { + title + link_type + price + } + samples { + id + title + } + } + } + } + } + } + MUTATION; + } + + private function getAddConfigurableProductToCartQuery(): string + { + return <<<'QUERY' + mutation($cartId: String!, $quantity: Float!, $parentSku: String!, $childSku: String!) { + addConfigurableProductsToCart( + input:{ + cart_id: $cartId + cart_items:{ + parent_sku: $parentSku + data:{ + sku: $childSku + quantity:$quantity + } + } + } + ) { + cart { + id + items { + id + quantity + product { + sku + } + ... on ConfigurableCartItem { + configurable_options { + id + option_label + value_id + value_label + } + } + } + } + } + } + QUERY; + } + + private function getAddBundleProductToCartQuery(string $cartId, string $sku) + { + $productRepository = $this->graphQlStateDiff->getTestObjectManager()->get(ProductRepositoryInterface::class); + $product = $productRepository->get($sku); + /** @var $typeInstance \Magento\Bundle\Model\Product\Type */ + $typeInstance = $product->getTypeInstance(); + $typeInstance->setStoreFilter($product->getStoreId(), $product); + /** @var $option \Magento\Bundle\Model\Option */ + $option = $typeInstance->getOptionsCollection($product)->getFirstItem(); + /** @var \Magento\Catalog\Model\Product $selection */ + $selection = $typeInstance->getSelectionsCollection([$option->getId()], $product)->getFirstItem(); + $optionId = $option->getId(); + $selectionId = $selection->getSelectionId(); + + return <<graphQlStateDiff = new GraphQlStateDiff(); + parent::setUp(); + } + + /** + * @inheritDoc + */ + protected function tearDown(): void + { + $this->graphQlStateDiff->tearDown(); + $this->graphQlStateDiff = null; + parent::tearDown(); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @dataProvider customerDataProvider + * @return void + */ + public function testCustomerState( + string $query, + array $variables, + array $variables2, + array $authInfo, + string $operationName, + string $expected, + ) : void { + if ($operationName === 'createCustomer') { + $emails = [$variables['email'], $variables2['email']]; + $this->clearCustomerBeforeTest($emails); + } + $this->graphQlStateDiff-> + testState($query, $variables, $variables2, $authInfo, $operationName, $expected, $this); + } + + /** + * @param array $emails + * @return void + */ + private function clearCustomerBeforeTest(array $emails): void + { + $customerRepository = $this->graphQlStateDiff->getTestObjectManager() + ->get(CustomerRepositoryInterface::class); + $registry = $this->graphQlStateDiff->getTestObjectManager()->get(Registry::class); + $registry->register('isSecureArea', true); + foreach ($emails as $email) { + try { + $customer = $customerRepository->get($email); + $customerRepository->delete($customer); + } catch (NoSuchEntityException $e) { + // Customer does not exist + } + } + $registry->unregister('isSecureArea', false); + } + + /** + * + * @magentoDataFixture Magento/Checkout/_files/quote_with_virtual_product_saved.php + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + */ + public function testMergeCarts(): void + { + $cartId1 = $this->graphQlStateDiff->getCartIdHash('test_order_with_virtual_product_without_address'); + $cartId2 = $this->graphQlStateDiff->getCartIdHash('test_quote'); + $query = $this->getCartMergeMutation(); + $this->graphQlStateDiff->testState( + $query, + ['cartId1' => $cartId1, 'cartId2' => $cartId2], + [], + ['email' => 'customer@example.com', 'password' => 'password'], + 'mergeCarts', + '"data":{"mergeCarts":', + $this + ); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @return void + */ + public function testRequestPasswordResetEmail(): void + { + $query = $this->getRequestPasswordResetEmailMutation(); + $this->graphQlStateDiff->testState( + $query, + ['email' => 'customer@example.com'], + [], + [], + 'requestPasswordResetEmail', + '"data":{"requestPasswordResetEmail":', + $this + ); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @return void + */ + public function testResetPassword(): void + { + $query = $this->getResetPasswordMutation(); + $email = 'customer@example.com'; + $this->graphQlStateDiff->testState( + $query, + ['email' => $email, 'newPassword' => 'new_password123', 'resetPasswordToken' => $this->graphQlStateDiff->getResetPasswordToken($email)], + [], + [], + 'resetPassword', + '"data":{"resetPassword":', + $this + ); + + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @return void + */ + public function testChangePassword(): void + { + $query = $this->getChangePasswordMutation(); + $this->graphQlStateDiff->testState( + $query, + ['currentPassword' => 'password', 'newPassword' => 'new_password123'], + ['currentPassword' => 'new_password123', 'newPassword' => 'password_new123'], + [['email'=>'customer@example.com', 'password' => 'password'], + ['email'=>'customer@example.com', 'password' => 'new_password123']], + 'changeCustomerPassword', + '"data":{"changeCustomerPassword":', + $this + ); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_without_addresses.php + * @return void + */ + public function testCreateCustomerAddress(): void + { + $query = $this->getCreateCustomerAddressMutation(); + $this->graphQlStateDiff->testState( + $query, + [], + [], + ['email' => 'customer@example.com', 'password' => 'password'], + 'createCustomerAddress', + '"data":{"createCustomerAddress":', + $this + ); + } + + /** + * Queries, variables, operation names, and expected responses for test + * + * @return array[] + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function customerDataProvider(): array + { + return [ + 'Create Customer' => [ + <<<'QUERY' + mutation($firstname: String!, $lastname: String!, $email: String!, $password: String!) { + createCustomerV2( + input: { + firstname: $firstname, + lastname: $lastname, + email: $email, + password: $password + } + ) { + customer { + created_at + prefix + firstname + middlename + lastname + suffix + email + default_billing + default_shipping + date_of_birth + taxvat + is_subscribed + gender + allow_remote_shopping_assistance + } + } + } + QUERY, + [ + 'firstname' => 'John', + 'lastname' => 'Doe', + 'email' => 'email1@example.com', + 'password' => 'Password-1', + ], + [ + 'firstname' => 'John', + 'lastname' => 'Doe', + 'email' => 'email2@adobe.com', + 'password' => 'Password-2', + ], + [], + 'createCustomer', + '"email":"', + ], + 'Update Customer' => [ + <<<'QUERY' + mutation($allow: Boolean!) { + updateCustomerV2( + input: { + allow_remote_shopping_assistance: $allow + } + ) { + customer { + allow_remote_shopping_assistance + } + } + } + QUERY, + ['allow' => true], + ['allow' => false], + ['email' => 'customer@example.com', 'password' => 'password'], + 'updateCustomer', + 'allow_remote_shopping_assistance' + ], + 'Update Customer Address' => [ + <<<'QUERY' + mutation($addressId: Int!, $city: String!) { + updateCustomerAddress(id: $addressId, input: { + region: { + region: "Alberta" + region_id: 66 + region_code: "AB" + } + country_code: CA + street: ["Line 1 Street","Line 2"] + company: "Company Name" + telephone: "123456789" + fax: "123123123" + postcode: "7777" + city: $city + firstname: "Adam" + lastname: "Phillis" + middlename: "A" + prefix: "Mr." + suffix: "Jr." + vat_id: "1" + default_shipping: true + default_billing: true + }) { + id + customer_id + region { + region + region_id + region_code + } + country_code + street + company + telephone + fax + postcode + city + firstname + lastname + middlename + prefix + suffix + vat_id + default_shipping + default_billing + } + } + QUERY, + ['addressId' => 1, 'city' => 'New York'], + ['addressId' => 1, 'city' => 'Austin'], + ['email' => 'customer@example.com', 'password' => 'password'], + 'updateCustomerAddress', + 'city' + ], + 'Update Customer Email' => [ + <<<'QUERY' + mutation($email: String!, $password: String!) { + updateCustomerEmail( + email: $email + password: $password + ) { + customer { + email + } + } + } + QUERY, + ['email' => 'customer2@example.com', 'password' => 'password'], + ['email' => 'customer@example.com', 'password' => 'password'], + [ + ['email' => 'customer@example.com', 'password' => 'password'], + ['email' => 'customer2@example.com', 'password' => 'password'], + ], + 'updateCustomerEmail', + 'email', + ], + 'Generate Customer Token' => [ + <<<'QUERY' + mutation($email: String!, $password: String!) { + generateCustomerToken(email: $email, password: $password) { + token + } + } + QUERY, + ['email' => 'customer@example.com', 'password' => 'password'], + ['email' => 'customer@example.com', 'password' => 'password'], + [], + 'generateCustomerToken', + 'token' + ], + 'Get Customer' => [ + <<<'QUERY' + query { + customer { + created_at + date_of_birth + default_billing + default_shipping + date_of_birth + email + firstname + gender + id + is_subscribed + lastname + middlename + prefix + suffix + taxvat + } + } + QUERY, + [], + [], + ['email' => 'customer@example.com', 'password' => 'password'], + 'getCustomer', + '"data":{"customer":{"created_at"' + ], + ]; + } + + private function getCartMergeMutation(): string + { + return <<<'QUERY' + mutation($cartId1: String!, $cartId2: String!) { + mergeCarts( + source_cart_id: $cartId1 + destination_cart_id: $cartId2 + ) { + items { + quantity + product { + sku + } + } + } + } +QUERY; + + } + + private function getRequestPasswordResetEmailMutation(): string + { + return <<<'QUERY' + mutation($email: String!) { + requestPasswordResetEmail(email: $email) + } + QUERY; + + } + + private function getResetPasswordMutation() + { + return <<<'QUERY' + mutation($email: String!, $newPassword: String!, $resetPasswordToken: String!) { + resetPassword( + email: $email + resetPasswordToken: $resetPasswordToken + newPassword: $newPassword + ) + } + QUERY; + } + + private function getChangePasswordMutation() + { + return <<<'QUERY' + mutation($currentPassword: String!, $newPassword: String!) { + changeCustomerPassword( + currentPassword: $currentPassword + newPassword: $newPassword + ) { + id + email + firstname + lastname + } + } + QUERY; + + } + + private function getCreateCustomerAddressMutation(): string + { + return <<<'QUERY' + mutation { + createCustomerAddress( + input: { + region: { + region: "Alberta" + region_id: 66 + region_code: "AB" + } + country_code: CA + street: ["Line 1 Street","Line 2"] + company: "Company Name" + telephone: "123456789" + fax: "123123123" + postcode: "7777" + city: "New York" + firstname: "Adam" + lastname: "Phillis" + middlename: "A" + prefix: "Mr." + suffix: "Jr." + vat_id: "1" + default_shipping: true + default_billing: true + } + ) { + id + customer_id + region { + region + region_id + region_code + } + country_code + street + company + telephone + fax + postcode + city + firstname + lastname + middlename + prefix + suffix + vat_id + default_shipping + default_billing + } + } + QUERY; + } +} diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php b/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php index 1f3ea9076d248..8d4702e28c215 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php @@ -7,17 +7,8 @@ namespace Magento\GraphQl\App; -use Magento\Customer\Api\CustomerRepositoryInterface; -use Magento\Framework\App\Http as HttpApp; -use Magento\Framework\App\ObjectManager as AppObjectManager; -use Magento\Framework\App\Request\HttpFactory as RequestFactory; -use Magento\Framework\App\Response\Http as HttpResponse; -use Magento\Framework\ObjectManagerInterface; -use Magento\Framework\Registry; -use Magento\GraphQl\App\State\Comparator; -use Magento\GraphQl\App\State\ObjectManager; -use Magento\Integration\Api\CustomerTokenServiceInterface; -use Magento\TestFramework\Helper\Bootstrap; +use Magento\GraphQl\App\State\GraphQlStateDiff; +use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId; /** * Tests the dispatch method in the GraphQl Controller class using a simple product query @@ -26,45 +17,25 @@ * @magentoDbIsolation disabled * @magentoAppIsolation enabled * @magentoAppArea graphql - * @magentoDataFixture Magento/Catalog/_files/multiple_mixed_products.php - * @magentoDataFixture Magento/Catalog/_files/categories.php - * */ class GraphQlStateTest extends \PHPUnit\Framework\TestCase { - private const CONTENT_TYPE = 'application/json'; - - /** @var ObjectManagerInterface */ - private ObjectManagerInterface $objectManagerBeforeTest; - - /** @var ObjectManager */ - private ObjectManager $objectManagerForTest; - - /** @var Comparator */ - private Comparator $comparator; - - /** @var RequestFactory */ - private RequestFactory $requestFactory; - - /** @var CustomerRepositoryInterface */ - private CustomerRepositoryInterface $customerRepository; + /** + * @var GetMaskedQuoteIdByReservedOrderId + */ + private $getMaskedQuoteIdByReservedOrderId; - /** @var Registry */ - private $registry; + /** + * @var GraphQlStateDiff|null + */ + private ?GraphQlStateDiff $graphQlStateDiff; /** * @inheritDoc */ protected function setUp(): void { - $this->objectManagerBeforeTest = Bootstrap::getObjectManager(); - $this->objectManagerForTest = new ObjectManager($this->objectManagerBeforeTest); - $this->objectManagerForTest->getFactory()->setObjectManager($this->objectManagerForTest); - AppObjectManager::setInstance($this->objectManagerForTest); - Bootstrap::setObjectManager($this->objectManagerForTest); - $this->comparator = $this->objectManagerForTest->create(Comparator::class); - $this->requestFactory = $this->objectManagerForTest->get(RequestFactory::class); - $this->objectManagerForTest->resetStateSharedInstances(); + $this->graphQlStateDiff = new GraphQlStateDiff(); parent::setUp(); } @@ -73,48 +44,13 @@ protected function setUp(): void */ protected function tearDown(): void { - $this->objectManagerBeforeTest->getFactory()->setObjectManager($this->objectManagerBeforeTest); - AppObjectManager::setInstance($this->objectManagerBeforeTest); - Bootstrap::setObjectManager($this->objectManagerBeforeTest); + $this->graphQlStateDiff->tearDown(); + $this->graphQlStateDiff = null; parent::tearDown(); } - /** - * @magentoDataFixture Magento/Customer/_files/customer.php - * @magentoDataFixture Magento/Customer/_files/customer_address.php - * @dataProvider customerDataProvider - * @return void - * @throws \Exception - */ - public function testCustomerState( - string $query, - array $variables, - array $variables2, - array $authInfo, - string $operationName, - string $expected, - ) : void { - if ($operationName === 'createCustomer') { - $this->customerRepository = $this->objectManagerForTest->get(CustomerRepositoryInterface::class); - $this->registry = $this->objectManagerForTest->get(Registry::class); - $this->registry->register('isSecureArea', true); - try { - $customer = $this->customerRepository->get($variables['email']); - $this->customerRepository->delete($customer); - $customer2 = $this->customerRepository->get($variables2['email']); - $this->customerRepository->delete($customer2); - } catch (\Exception $e) { - // Customer does not exist - } finally { - $this->registry->unregister('isSecureArea', false); - } - } - $this->testState($query, $variables, $variables2, $authInfo, $operationName, $expected); - } - /** * Runs various GraphQL queries and checks if state of shared objects in Object Manager have changed - * * @dataProvider queryDataProvider * @param string $query * @param array $variables @@ -122,6 +58,9 @@ public function testCustomerState( * @param array $authInfo * @param string $operationName * @param string $expected + * @magentoDataFixture Magento/Store/_files/store.php + * @magentoDataFixture Magento/Catalog/_files/multiple_mixed_products.php + * @magentoDataFixture Magento/Catalog/_files/categories.php * @return void * @throws \Exception */ @@ -133,94 +72,50 @@ public function testState( string $operationName, string $expected, ): void { - if (array_key_exists(1, $authInfo)) { - $authInfo1 = $authInfo[0]; - $authInfo2 = $authInfo[1]; - } else { - $authInfo1 = $authInfo; - $authInfo2 = $authInfo; - } - $jsonEncodedRequest = json_encode([ - 'query' => $query, - 'variables' => $variables, - 'operationName' => $operationName - ]); - $output1 = $this->request($jsonEncodedRequest, $operationName, $authInfo1, true); - $this->assertStringContainsString($expected, $output1); - if ($variables2) { - $jsonEncodedRequest = json_encode([ - 'query' => $query, - 'variables' => $variables2, - 'operationName' => $operationName - ]); - } - $output2 = $this->request($jsonEncodedRequest, $operationName, $authInfo2); - $this->assertStringContainsString($expected, $output2); + $this->graphQlStateDiff + ->testState($query, $variables, $variables2, $authInfo, $operationName, $expected, $this); } - /** - * @param string $query - * @param string $operationName - * @param array $authInfo - * @param bool $firstRequest - * @return string - * @throws \Exception - */ - private function request(string $query, string $operationName, array $authInfo, bool $firstRequest = false): string - { - $this->objectManagerForTest->resetStateSharedInstances(); - $this->comparator->rememberObjectsStateBefore($firstRequest); - $response = $this->doRequest($query, $authInfo); - $this->objectManagerForTest->resetStateSharedInstances(); - $this->comparator->rememberObjectsStateAfter($firstRequest); - $result = $this->comparator->compareBetweenRequests($operationName); - $this->assertEmpty( - $result, - sprintf( - '%d objects changed state during request. Details: %s', - count($result), - var_export($result, true) - ) - ); - $result = $this->comparator->compareConstructedAgainstCurrent($operationName); - $this->assertEmpty( - $result, - sprintf( - '%d objects changed state since constructed. Details: %s', - count($result), - var_export($result, true) - ) - ); - return $response; - } /** - * Process the GraphQL request - * + * @magentoConfigFixture default_store catalog/seo/product_url_suffix test_product_suffix + * @magentoConfigFixture default_store catalog/seo/category_url_suffix test_category_suffix + * @magentoConfigFixture default_store catalog/seo/title_separator ___ + * @magentoConfigFixture default_store catalog/frontend/list_mode 2 + * @magentoConfigFixture default_store catalog/frontend/grid_per_page_values 16 + * @magentoConfigFixture default_store catalog/frontend/list_per_page_values 8 + * @magentoConfigFixture default_store catalog/frontend/grid_per_page 16 + * @magentoConfigFixture default_store catalog/frontend/list_per_page 8 + * @magentoConfigFixture default_store catalog/frontend/default_sort_by asc + * @magentoDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php + * @magentoDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php + * @dataProvider cartQueryProvider * @param string $query - * @return string + * @param array $variables + * @param array $variables2 + * @param array $authInfo + * @param string $operationName + * @param string $expected + * @return void */ - private function doRequest(string $query, array $authInfo) - { - $request = $this->requestFactory->create(); - $request->setContent($query); - $request->setMethod('POST'); - $request->setPathInfo('/graphql'); - $request->getHeaders()->addHeaders(['content_type' => self::CONTENT_TYPE]); - if ($authInfo) { - $email = $authInfo['email']; - $password = $authInfo['password']; - $customerToken = $this->objectManagerForTest->get(CustomerTokenServiceInterface::class) - ->createCustomerAccessToken($email, $password); - $request->getHeaders()->addHeaders(['Authorization' => 'Bearer ' . $customerToken]); + public function testCartState( + string $query, + array $variables, + array $variables2, + array $authInfo, + string $operationName, + string $expected + ): void { + if ($operationName == 'getCart') { + $this->getMaskedQuoteIdByReservedOrderId = + $this->graphQlStateDiff->getTestObjectManager()->get(GetMaskedQuoteIdByReservedOrderId::class); + $variables['id'] = $this->getMaskedQuoteIdByReservedOrderId->execute($variables['id']); } - $unusedResponse = $this->objectManagerForTest->create(HttpResponse::class); - $httpApp = $this->objectManagerForTest->create( - HttpApp::class, - ['request' => $request, 'response' => $unusedResponse] - ); - $actualResponse = $httpApp->launch(); - return $actualResponse->getContent(); + $this->graphQlStateDiff + ->testState($query, $variables, $variables2, $authInfo, $operationName, $expected, $this); } /** @@ -229,7 +124,7 @@ private function doRequest(string $query, array $authInfo) * @return array[] * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function queryDataProvider(): array + private function queryDataProvider(): array { return [ 'Get Navigation Menu by category_id' => [ @@ -449,176 +344,215 @@ public function queryDataProvider(): array 'resolveUrl', '"type":"CMS_PAGE","id":1' ], - ]; - } - - /** - * Queries, variables, operation names, and expected responses for test - * - * @return array[] - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function customerDataProvider(): array - { - return [ - 'Create Customer' => [ + 'Get available Stores' => [ <<<'QUERY' - mutation($firstname: String!, $lastname: String!, $email: String!, $password: String!) { - createCustomerV2( - input: { - firstname: $firstname, - lastname: $lastname, - email: $email, - password: $password - } - ) { - customer { - created_at - prefix - firstname - middlename - lastname - suffix - email - default_billing - default_shipping - date_of_birth - taxvat - is_subscribed - gender - allow_remote_shopping_assistance + query availableStores($currentGroup: Boolean!) { + availableStores(useCurrentGroup:$currentGroup) { + id, + code, + store_code, + store_name, + store_sort_order, + is_default_store, + store_group_code, + store_group_name, + is_default_store_group, + website_id, + website_code, + website_name, + locale, + base_currency_code, + default_display_currency_code, + timezone, + weight_unit, + base_url, + base_link_url, + base_media_url, + secure_base_url, + secure_base_link_url, + secure_base_static_url, + secure_base_media_url, + store_name + use_store_in_url } } - } - QUERY, - [ - 'firstname' => 'John', - 'lastname' => 'Doe', - 'email' => 'email1@example.com', - 'password' => 'Password-1', - ], - [ - 'firstname' => 'John', - 'lastname' => 'Doe', - 'email' => 'email2@adobe.com', - 'password' => 'Password-2', - ], + QUERY, + ['currentGroup' => true], [], - 'createCustomer', - '"email":"', + [], + 'availableStores', + '"store_code":"default"' ], - 'Update Customer' => [ + 'Get store config' => [ <<<'QUERY' - mutation($allow: Boolean!) { - updateCustomerV2( - input: { - allow_remote_shopping_assistance: $allow - } - ) { - customer { - allow_remote_shopping_assistance + query { + storeConfig { + product_url_suffix, + category_url_suffix, + title_separator, + list_mode, + grid_per_page_values, + list_per_page_values, + grid_per_page, + list_per_page, + catalog_default_sort_by, + root_category_id + root_category_uid } } - } - QUERY, - ['allow' => true], - ['allow' => false], - ['email' => 'customer@example.com', 'password' => 'password'], - 'updateCustomer', - 'allow_remote_shopping_assistance' + QUERY, + [], + [], + [], + 'storeConfig', + '"storeConfig":{"product_url_suffix":".html"' ], - 'Update Customer Address' => [ + 'Get Categories by name' => [ <<<'QUERY' - mutation($addressId: Int!, $city: String!) { - updateCustomerAddress(id: $addressId, input: { - region: { - region: "Alberta" - region_id: 66 - region_code: "AB" - } - country_code: CA - street: ["Line 1 Street","Line 2"] - company: "Company Name" - telephone: "123456789" - fax: "123123123" - postcode: "7777" - city: $city - firstname: "Adam" - lastname: "Phillis" - middlename: "A" - prefix: "Mr." - suffix: "Jr." - vat_id: "1" - default_shipping: true - default_billing: true - }) { - id - customer_id - region { - region - region_id - region_code + query categories($name: String!) { + categories(filters: {name: {match: $name}} + pageSize: 3 + currentPage: 3 + ) { + total_count + page_info { + current_page + page_size + total_pages + + } + items { + name } - country_code - street - company - telephone - fax - postcode - city - firstname - lastname - middlename - prefix - suffix - vat_id - default_shipping - default_billing - } + } } QUERY, - ['addressId' => 1, 'city' => 'New York'], - ['addressId' => 1, 'city' => 'Austin'], - ['email' => 'customer@example.com', 'password' => 'password'], - 'updateCustomerAddress', - 'city' + ['name' => 'Category'], + [], + [], + 'categories', + '"data":{"categories"' ], - 'Update Customer Email' => [ + 'Get Products by name' => [ <<<'QUERY' - mutation($email: String!, $password: String!) { - updateCustomerEmail( - email: $email - password: $password - ) { - customer { - email + query products($name: String!) { + products( + search: $name + filter: {} + pageSize: 1000 + currentPage: 1 + sort: {name: ASC} + ) { + + items { + name + image + { + url + } + attribute_set_id + canonical_url + color + country_of_manufacture + created_at + gift_message_available + id + manufacturer + meta_description + meta_keyword + meta_title + new_from_date + new_to_date + only_x_left_in_stock + options_container + rating_summary + review_count + sku + special_price + special_to_date + stock_status + swatch_image + uid + updated_at + url_key + url_path + url_suffix + + } + page_info { + current_page + page_size + total_pages + } + sort_fields { + default + } + suggestions { + search } + total_count } } QUERY, - ['email' => 'customer2@example.com', 'password' => 'password'], - ['email' => 'customer@example.com', 'password' => 'password'], - [ - ['email' => 'customer@example.com', 'password' => 'password'], - ['email' => 'customer2@example.com', 'password' => 'password'], - ], - 'updateCustomerEmail', - 'email', + ['name' => 'Simple Product1'], + [], + [], + 'products', + '"data":{"products":{"items":[{' ], - 'Generate Customer Token' => [ + ]; + } + + public function cartQueryProvider(): array + { + return [ + 'Get Cart' => [ <<<'QUERY' - mutation($email: String!, $password: String!) { - generateCustomerToken(email: $email, password: $password) { - token + query cart($id: String!) { + cart(cart_id: $id) { + applied_coupons { + code + } + + available_payment_methods { + code + is_deferred + title + } + billing_address { + city + company + firstname + lastname + postcode + street + telephone + uid + vat_id + } + email + id + is_virtual + items { + id + quantity + uid + } + selected_payment_method { + code + purchase_order_number + title } + total_quantity } + } QUERY, - ['email' => 'customer@example.com', 'password' => 'password'], - ['email' => 'customer@example.com', 'password' => 'password'], + ['id' => 'test_quote'], + [], [], - 'generateCustomerToken', - 'token' - ] + 'getCart', + '"cart":{"applied_coupons":null,"available_payment_methods":[{"code":"checkmo"' + ], ]; } } diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php b/dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php new file mode 100644 index 0000000000000..5ffd74762cc2e --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php @@ -0,0 +1,231 @@ +objectManagerBeforeTest = Bootstrap::getObjectManager(); + $this->objectManagerForTest = new ObjectManager($this->objectManagerBeforeTest); + $this->objectManagerForTest->getFactory()->setObjectManager($this->objectManagerForTest); + AppObjectManager::setInstance($this->objectManagerForTest); + Bootstrap::setObjectManager($this->objectManagerForTest); + $this->comparator = $this->objectManagerForTest->create(Comparator::class); + $this->objectManagerForTest->resetStateSharedInstances(); + } + + public function getTestObjectManager() + { + return $this->objectManagerForTest; + } + + public function tearDown(): void + { + $this->objectManagerBeforeTest->getFactory()->setObjectManager($this->objectManagerBeforeTest); + AppObjectManager::setInstance($this->objectManagerBeforeTest); + Bootstrap::setObjectManager($this->objectManagerBeforeTest); + } + + public function testState( + string $query, + array $variables, + array $variables2, + array $authInfo, + string $operationName, + string $expected, + TestCase $test + ): void { + if (array_key_exists(1, $authInfo)) { + $authInfo1 = $authInfo[0]; + $authInfo2 = $authInfo[1]; + } else { + $authInfo1 = $authInfo; + $authInfo2 = $authInfo; + } + $jsonEncodedRequest = json_encode([ + 'query' => $query, + 'variables' => $variables, + 'operationName' => $operationName + ]); + $output1 = $this->request($jsonEncodedRequest, $operationName, $authInfo1, $test,true); + $test->assertStringContainsString($expected, $output1); + if ($operationName === 'placeOrder' || $operationName === 'mergeCarts') { + foreach($variables as $cartId) { + $this->reactivateCart($cartId); + } + } elseif ($operationName==='applyCouponToCart') { + $this->removeCouponFromCart($variables); + } elseif ($operationName==='resetPassword') { + $variables2['resetPasswordToken'] = $this->getResetPasswordToken($variables['email']); + $variables2['email'] = $variables['email']; + $variables2['newPassword'] = $variables['newPassword']; + } + + if ($variables2) { + $jsonEncodedRequest = json_encode([ + 'query' => $query, + 'variables' => $variables2, + 'operationName' => $operationName + ]); + } + $output2 = $this->request($jsonEncodedRequest, $operationName, $authInfo2, $test); + $test->assertStringContainsString($expected, $output2); + } + + /** + * @param string $query + * @param string $operationName + * @param array $authInfo + * @param bool $firstRequest + * @return array + * @throws \Exception + */ + private function request(string $query, string $operationName, array $authInfo, TestCase $test, bool $firstRequest = false): string + { + $this->objectManagerForTest->resetStateSharedInstances(); + $this->comparator->rememberObjectsStateBefore($firstRequest); + $response = $this->doRequest($query, $authInfo); + $this->objectManagerForTest->resetStateSharedInstances(); + $this->comparator->rememberObjectsStateAfter($firstRequest); + $result = $this->comparator->compareBetweenRequests($operationName); + $test->assertEmpty( + $result, + sprintf( + '%d objects changed state during request. Details: %s', + count($result), + var_export($result, true) + ) + ); + $result = $this->comparator->compareConstructedAgainstCurrent($operationName); + $test->assertEmpty( + $result, + sprintf( + '%d objects changed state since constructed. Details: %s', + count($result), + var_export($result, true) + ) + ); + return $response; + } + + /** + * Process the GraphQL request + * + * @param string $query + * @return string + */ + private function doRequest(string $query, array $authInfo) + { + $request = $this->objectManagerForTest->get(RequestInterface::class); + $request->setContent($query); + $request->setMethod('POST'); + $request->setPathInfo('/graphql'); + $request->getHeaders()->addHeaders(['content_type' => self::CONTENT_TYPE]); + if ($authInfo) { + $email = $authInfo['email']; + $password = $authInfo['password']; + $customerToken = $this->objectManagerForTest->get(CustomerTokenServiceInterface::class) + ->createCustomerAccessToken($email, $password); + $request->getHeaders()->addHeaders(['Authorization' => 'Bearer ' . $customerToken]); + } + $unusedResponse = $this->objectManagerForTest->create(HttpResponse::class); + $httpApp = $this->objectManagerForTest->create( + HttpApp::class, + ['request' => $request, 'response' => $unusedResponse] + ); + $actualResponse = $httpApp->launch(); + return $actualResponse->getContent(); + } + + private function removeCouponFromCart(array $variables) + { + $couponManagement = $this->objectManagerForTest->get(\Magento\Quote\Api\CouponManagementInterface::class); + $cartId = $this->getCartId($variables['cartId']); + $couponManagement->remove($cartId); + } + + /** + * @param array $variables + * @return void + */ + private function reactivateCart(string $cartId) + { + $cartId = $this->getCartId($cartId); + $cart = $this->objectManagerForTest->get(\Magento\Quote\Model\Quote::class); + $cart->load($cartId); + $cart->setIsActive(true); + $cart->save(); + } + private function getCartId(string $cartId) + { + $maskedQuoteIdToQuoteId = $this->objectManagerForTest->get(MaskedQuoteIdToQuoteIdInterface::class); + return $maskedQuoteIdToQuoteId->execute($cartId); + } + + public function getCartIdHash(string $cartId): string + { + $getMaskedQuoteIdByReservedOrderId = $this->getTestObjectManager() + ->get(GetMaskedQuoteIdByReservedOrderId::class); + return $getMaskedQuoteIdByReservedOrderId->execute($cartId); + } + + /** + * Get reset password token + * + * @return string + * + * @throws LocalizedException + * @throws NoSuchEntityException + */ + public function getResetPasswordToken(string $email): string + { + $accountManagement = $this->objectManagerForTest->get(AccountManagementInterface::class); + $customerRegistry = $this->objectManagerForTest->get(CustomerRegistry::class); + $accountManagement->initiatePasswordReset( + $email, + AccountManagement::EMAIL_RESET, + 1 + ); + + $customerSecure = $customerRegistry->retrieveSecureData(1); + return $customerSecure->getRpToken(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/App/State/ObjectManager.php b/dev/tests/integration/testsuite/Magento/GraphQl/App/State/ObjectManager.php index 52446dee26b1a..938e843373640 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/App/State/ObjectManager.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/App/State/ObjectManager.php @@ -21,14 +21,98 @@ class ObjectManager extends TestFrameworkObjectManager * * @param TestFrameworkObjectManager $testFrameworkObjectManager */ + private $bootstrappedObjects = [ + // Note: These are after $objectManager = $this->_factory->create($overriddenParams); + 'Magento\Framework\App\DeploymentConfig', + 'Magento\Framework\App\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem\DriverPool', + 'Magento\Framework\ObjectManager\RelationsInterface', + 'Magento\Framework\Interception\DefinitionInterface', + 'Magento\Framework\ObjectManager\ConfigInterface', + 'Magento\Framework\Interception\ObjectManager\ConfigInterface', + 'Magento\Framework\ObjectManager\DefinitionInterface', + 'Magento\Framework\Stdlib\BooleanUtils', + 'Magento\Framework\ObjectManager\Config\Mapper\Dom', + 'Magento\Framework\ObjectManager\ConfigLoaderInterface', + 'Magento\TestFramework\ObjectManager\Config', + 'Magento\Framework\ObjectManagerInterface', + 'Magento\RemoteStorage\Model\Config', + 'Magento\RemoteStorage\Driver\Adapter\MetadataProviderInterfaceFactory', + 'Magento\RemoteStorage\Driver\Adapter\Cache\CacheInterfaceFactory', + 'Magento\RemoteStorage\Driver\Adapter\CachedAdapterInterfaceFactory', + 'Magento\Framework\App\Cache\Proxy', + 'Aws\Credentials\CredentialsFactory', + 'Magento\Framework\Serialize\Serializer\Json', + 'Magento\AwsS3\Driver\CredentialsCache', + 'Magento\AwsS3\Driver\CachedCredentialsProvider', + 'Magento\AwsS3\Driver\AwsS3Factory', + 'Magento\RemoteStorage\Driver\DriverFactoryPool', + 'Magento\RemoteStorage\Driver\DriverPool', + 'remoteReadFactory', + 'Magento\RemoteStorage\Model\Filesystem\Directory\WriteFactory', + 'customRemoteFilesystem', + 'Magento\Framework\App\ResourceConnection\Proxy', + 'Magento\Framework\App\Cache\Frontend\Factory', + 'Magento\Framework\App\Cache\Frontend\Pool', + 'Magento\Framework\App\Cache\Type\FrontendPool', + 'Magento\Framework\App\Cache\Type\Config', + 'Magento\Framework\ObjectManager\Config\Reader\DomFactory', + 'Magento\Framework\Serialize\Serializer\Serialize', + 'Magento\Framework\App\ObjectManager\ConfigLoader', + // Note: These were added by addSharedInstance + 'Magento\Framework\App\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem', + 'Magento\Framework\Logger\LoggerProxy', + 'Magento\TestFramework\ErrorLog\Logger', + 'Magento\SalesSequence\Model\Builder', + 'Magento\Framework\App\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem\DirectoryList', + 'Magento\Framework\App\DeploymentConfig', + 'Magento\Framework\ObjectManager\ConfigLoaderInterface', + 'Magento\Framework\Filesystem', + 'Magento\Framework\Logger\LoggerProxy', + 'Magento\TestFramework\ErrorLog\Logger', + 'Magento\SalesSequence\Model\Builder', + 'Magento\Framework\App\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem\DirectoryList', + 'Magento\Framework\App\DeploymentConfig', + 'Magento\Framework\ObjectManager\ConfigLoaderInterface', + 'Magento\Framework\Filesystem', + 'Magento\Framework\Logger\LoggerProxy', + 'Magento\TestFramework\ErrorLog\Logger', + 'Magento\SalesSequence\Model\Builder', + 'Magento\GraphQl\App\State\SkipListAndFilterList', + 'Magento\GraphQl\App\State\Collector', + 'Magento\Framework\App\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem\DirectoryList', + 'Magento\Framework\App\DeploymentConfig', + 'Magento\Framework\ObjectManager\ConfigLoaderInterface', + 'Magento\Framework\Filesystem', + 'Magento\Framework\Logger\LoggerProxy', + 'Magento\TestFramework\ErrorLog\Logger', + 'Magento\SalesSequence\Model\Builder', + ]; public function __construct(TestFrameworkObjectManager $testFrameworkObjectManager) { /* Note: PHP doesn't have copy constructors, so we have to use get_object_vars, * but luckily all the properties in the superclass are protected. */ $properties = get_object_vars($testFrameworkObjectManager); foreach ($properties as $key => $value) { - $this->$key = $value; + if ($key === '_sharedInstances') { + foreach ($value as $class => $instance) { + if (in_array($class, $this->bootstrappedObjects)) { + $this->_sharedInstances[$class] = $instance; + } + } + } else { + $this->$key = $value; + } + } + $this->_sharedInstances['Magento\Framework\ObjectManagerInterface'] = $this; + $this->_sharedInstances['Magento\Framework\App\ObjectManager'] = $this; $this->_factory = new DynamicFactoryDecorator($this->_factory, $this); } diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php b/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php index b9e61ad57de92..971c4965445cc 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php @@ -7,542 +7,367 @@ /* These classes are skipped completely during comparison. */ return [ - 'navigationMenu' => [ - Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\ExtractDataFromCategoryTree::class => null, - Magento\Customer\Model\Session::class => null, - Magento\Framework\GraphQl\Query\Fields::class => null, - Magento\Framework\Session\Generic::class => null, - Magento\Framework\Module\ModuleList::class => null, - Magento\Framework\Module\Manager::class => null, - ], - 'productDetailByName' => [ - Magento\Customer\Model\Session::class => null, - Magento\Framework\GraphQl\Query\Fields::class => null, - Magento\Framework\Session\Generic::class => null, - Magento\Store\Model\GroupRepository::class => null, - ], - 'category' => [ - Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\ExtractDataFromCategoryTree::class => null, - Magento\Framework\GraphQl\Query\Fields::class => null, - ], - 'productDetail' => [ - Magento\Framework\GraphQl\Query\Fields::class => null, - ], - 'resolveUrl' => [ + '*' => [ + Magento\Framework\Translate\Inline::class => null, + Magento\Framework\Json\Encoder::class => null, + Magento\Framework\Lock\Proxy::class => null, + Magento\Framework\Indexer\Table\Strategy::class => null, Magento\Framework\GraphQl\Query\Fields::class => null, - ], - 'createCustomer' => [ - Magento\Framework\Logger\LoggerProxy::class => null, + Magento\Framework\Stdlib\ArrayManager::class => null, + Magento\Framework\Reflection\MethodsMap::class => null, + Magento\Framework\Reflection\DataObjectProcessor::class => null, + Magento\Framework\Api\DataObjectHelper::class => null, + Magento\Framework\Url\QueryParamsResolver::class => null, + Magento\Framework\Acl\Data\Cache::class => null, Magento\Framework\View\Asset\PreProcessor\Helper\Sort::class => null, Magento\Framework\Filter\FilterManager::class => null, - Magento\Store\Model\Address\Renderer::class => null, - Magento\Customer\Model\CustomerRegistry::class => null, - Magento\Eav\Model\ResourceModel\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\VersionControl\Metadata::class => null, - Magento\Customer\Model\ResourceModel\Address\Relation::class => null, Magento\Framework\Validator\Factory::class => null, - Magento\Customer\Model\ResourceModel\Address::class => null, Magento\Framework\Translate\Inline\ConfigInterface\Proxy::class => null, - Magento\Framework\Translate\Inline::class => null, Magento\Framework\Json\Helper\Data::class => null, - Magento\Directory\Helper\Data::class => null, - Magento\TestFramework\Api\Config\Reader\FileResolver::class => null, Magento\Framework\Api\ExtensionAttribute\JoinProcessor::class => null, - Magento\Customer\Model\ResourceModel\AddressRepository::class => null, - Magento\Framework\Reflection\MethodsMap::class => null, Magento\Framework\Reflection\ExtensionAttributesProcessor\Proxy::class => null, - Magento\Framework\Reflection\DataObjectProcessor::class => null, - Magento\Framework\Api\DataObjectHelper::class => null, - Magento\Customer\Model\AttributeMetadataConverter::class => null, - Magento\Customer\Model\Metadata\CustomerMetadata::class => null, - Magento\Customer\Model\Metadata\AttributeMetadataCache::class => null, - Magento\Customer\Model\Metadata\CustomerCachedMetadata::class => null, - Magento\Customer\Model\Config\Share::class => null, - Magento\Customer\Model\ResourceModel\Customer::class => null, Magento\Framework\Api\ImageProcessor::class => null, - Magento\Customer\Model\Session\Proxy::class => null, - Magento\Customer\Model\Delegation\Storage::class => null, - Magento\Customer\Model\GroupRegistry::class => null, Magento\Framework\Model\ResourceModel\Db\VersionControl\Metadata::class => null, Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot::class => null, - Magento\Tax\Model\TaxClass\Repository::class => null, - Magento\Customer\Model\ResourceModel\GroupRepository::class => null, - Magento\Customer\Model\ResourceModel\CustomerRepository::class => null, - Magento\TestFramework\Mail\Template\TransportBuilderMock::class => null, - Magento\Customer\Helper\View::class => null, Magento\Framework\Indexer\IndexerRegistry::class => null, - Magento\Customer\Model\Customer::class => null, Magento\Framework\Session\SessionMaxSizeConfig::class => null, - Magento\Framework\Session\SaveHandler::class => null, - Magento\Paypal\Plugin\TransparentSessionChecker::class => null, - Laminas\Uri\Uri::class => null, - Magento\Backend\App\Area\FrontNameResolver::class => null, - Magento\Backend\Helper\Data::class => null, - Magento\GraphQl\Plugin\DisableSession::class => null, - Magento\Framework\Session\Generic::class => null, - Magento\Customer\Model\Session\SessionCleaner::class => null, - Magento\Customer\Model\Authorization\CustomerSessionUserContext::class => null, - Magento\JwtUserToken\Model\ResourceModel\FastStorageRevokedWrapper::class => null, - Magento\Webapi\Model\Authorization\TokenUserContext::class => null, - Magento\Authorization\Model\CompositeUserContext::class => null, - Magento\Webapi\Model\WebapiRoleLocator::class => null, - Magento\Customer\Model\Authentication::class => null, - 'CustomerAddressSnapshot' => null, - 'EavVersionControlSnapshot' => null, - Magento\Catalog\Helper\Product\Flat\Indexer::class => null, - Magento\Catalog\Helper\Product::class => null, - Magento\Framework\Url\Helper\Data::class => null, - Magento\Customer\Model\Session::class => null, - Magento\Framework\Validator\EmailAddress::class => null, - Magento\CustomerGraphQl\Model\Customer\ValidateCustomerData\ValidateEmail::class => null, - Magento\CustomerGraphQl\Model\Customer\ValidateCustomerData::class => null, - Magento\Newsletter\Model\CustomerSubscriberCache::class => null, - Magento\Newsletter\Model\SubscriptionManager::class => null, - Magento\LoginAsCustomerAssistance\Model\IsAssistanceEnabled::class => null, + Magento\Framework\Module\Manager::class => null, Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\Communication::class => null, Magento\Framework\Webapi\ServiceInputProcessor::class => null, Magento\Framework\MessageQueue\Publisher\Config\RemoteService\Reader::class => null, - Magento\Framework\Pricing\Helper\Data::class => null, - Magento\Catalog\Helper\Category::class => null, - Magento\Catalog\Helper\Data::class => null, - Magento\Tax\Helper\Data::class => null, - Magento\Weee\Helper\Data::class => null, - Magento\Quote\Model\Quote\Address\Total\Collector::class => null, - Magento\Catalog\Helper\Product\Configuration::class => null, - Magento\Bundle\Helper\Catalog\Product\Configuration::class => null, - Magento\Eav\Model\AttributeDataFactory::class => null, - Magento\PageCache\Model\Cache\Server::class => null, - Magento\Catalog\Helper\Product\Edit\Action\Attribute::class => null, - Magento\Newsletter\Model\Plugin\CustomerPlugin::class => null, - Magento\Newsletter\Helper\Data::class => null, - Magento\Developer\Helper\Data::class => null, - Magento\Wishlist\Plugin\SaveWishlistDataAndAddReferenceKeyToBackUrl::class => null, - Magento\Framework\View\Page\Config\Generator\Head::class => null, - Magento\Store\Model\Argument\Interpreter\ServiceUrl::class => null, - Magento\Framework\View\Layout\Argument\Interpreter\Url::class => null, - Magento\Framework\Css\PreProcessor\Adapter\CssInliner::class => null, + Magento\Framework\Registry::class => null, Magento\Framework\Module\ModuleList::class => null, - Magento\Framework\Module\Manager::class => null, - Magento\Authorization\Model\UserContextInterface\Proxy::class => null, - Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper::class => null, - Magento\Catalog\Model\Product\Attribute\Repository::class => null, - Magento\Catalog\Model\ProductRepository::class => null, - Magento\Framework\DataObject\Copy::class => null, - Magento\Quote\Model\Quote\Item\Processor::class => null, - Magento\Sales\Model\Config::class => null, - Magento\Customer\Model\Session\Validators\CutoffValidator::class => null, - Magento\Customer\Model\Session\Storage::class => null, - Magento\Tax\Model\Calculation::class => null, - Magento\OfflineShipping\Model\SalesRule\Calculator::class => null, - Magento\SalesRule\Model\Validator::class => null, + Magento\Framework\Session\Storage::class => null, + Magento\Framework\Translate\Inline\Proxy::class => null, + Magento\Framework\App\View::class => null, + Magento\Framework\App\Action\Context::class => null, + Magento\Framework\Event\Config\Data::class => null, + Magento\Framework\App\AreaList::class => null, + Magento\Framework\App\DeploymentConfig::class => null, + Magento\Framework\App\Cache\Frontend\Pool::class => null, + Magento\Framework\App\Cache\Type\FrontendPool::class => null, + Magento\Framework\App\DeploymentConfig\Writer::class => null, + Magento\Framework\App\Cache\State::class => null, + Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile::class => null, + Magento\Framework\Module\Dir\Reader::class => null, + Magento\Framework\Module\PackageInfo::class => null, + Magento\Framework\App\Language\Dictionary::class => null, + Magento\Framework\ObjectManager\ConfigInterface::class => null, + Magento\Framework\App\Cache\Type\Config::class => null, + Magento\Framework\Interception\PluginListGenerator::class => null, + Magento\Framework\View\FileSystem::class => null, + Magento\Framework\App\Config\FileResolver::class => null, + Magento\Framework\App\Request\Http\Proxy::class => null, + Magento\Framework\Event\Config\Reader\Proxy::class => null, + Magento\Framework\View\Asset\Source::class => null, + Magento\Framework\Translate\ResourceInterface\Proxy::class => null, + Magento\Framework\Locale\Resolver\Proxy::class => null, + Magento\Framework\Locale\Resolver::class => null, + Magento\Framework\App\Http\Context::class => null, + Magento\Framework\View\Design\Fallback\RulePool::class => null, + Magento\Framework\View\Asset\Repository::class => null, + Magento\Framework\HTTP\Header::class => null, + Magento\Framework\App\Route\Config::class => null, + Magento\Framework\App\Cache\Proxy::class => null, + Magento\Framework\Translate::class => null, + Magento\Framework\View\Asset\Minification::class => null, + Magento\Framework\Url::class => null, + Magento\Framework\HTTP\PhpEnvironment\RemoteAddress::class => null, + Magento\Framework\ObjectManager\DefinitionInterface::class => null, + Magento\Framework\App\ResourceConnection::class => null, + Magento\Framework\App\ResourceConnection\Interceptor::class => null, + Magento\Framework\Session\SaveHandler::class => null, // TODO: check this + Magento\Framework\Css\PreProcessor\Adapter\CssInliner::class => null, + Magento\Framework\Config\Scope::class => null, + Magento\Framework\App\ResourceConnection\Config::class => null, + Magento\Framework\Cache\Config\Data::class => null, + Magento\Framework\Model\ActionValidator\RemoveAction::class => null, + Magento\Framework\Session\Generic::class => null, + Magento\Framework\Validator\EmailAddress::class => null, + Magento\Sales\Model\Order\Email\Container\Template::class => null, + Magento\Sales\Model\Order\Email\Container\OrderIdentity::class => null, + Magento\Sales\Model\Order\Email\Sender\OrderSender::class => null, + Magento\Sales\Model\Order\Email\Sender\OrderCommentSender::class => null, + Magento\Sales\Model\Order\Email\Sender\InvoiceCommentSender::class => null, + Magento\Sales\Model\Order\Email\Sender\InvoiceSender::class => null, + Magento\Sales\Model\Order\Email\Sender\CreditmemoCommentSender::class => null, + Magento\Sales\Model\Order\Email\Sender\CreditmemoSender::class => null, + Magento\Sales\Model\Order\ItemRepository::class => null, + Magento\Sales\Model\ResourceModel\Order\Relation::class => null, + Magento\Sales\Model\ResourceModel\Order\Handler\Address::class => null, + Magento\Sales\Model\OrderIncrementIdChecker::class => null, + Magento\Sales\Api\Data\OrderSearchResultInterfaceFactory::class => null, + Magento\Sales\Api\Data\OrderExtensionFactory::class => null, + Magento\Sales\Model\OrderRepository::class => null, Magento\Sales\Model\ResourceModel\Order\Payment::class => null, - Magento\Sales\Model\ResourceModel\Order\Status\History::class => null, Magento\Sales\Model\ResourceModel\Order::class => null, + Magento\Sales\Model\ResourceModel\Attribute::class => null, + Magento\SalesRule\Model\DeltaPriceRound::class => null, + Magento\SalesRule\Helper\CartFixedDiscount::class => null, + Magento\SalesRule\Api\Data\RuleInterfaceFactory::class => null, + Magento\SalesRule\Api\Data\ConditionInterfaceFactory::class => null, + Magento\SalesRule\Api\Data\RuleLabelInterfaceFactory::class => null, + Magento\SalesRule\Model\Converter\ToDataModel::class => null, + Magento\SalesRule\Model\Converter\ToModel::class => null, + Magento\SalesRule\Api\Data\RuleSearchResultInterfaceFactory::class => null, + Magento\SalesRule\Model\RuleRepository::class => null, + Magento\SalesRule\Model\RuleFactory::class => null, + Magento\SalesSequence\Model\MetaFactory::class => null, + Magento\SalesSequence\Model\ProfileFactory::class => null, + Magento\SalesSequence\Model\ResourceModel\Profile::class => null, + Magento\SalesSequence\Model\ResourceModel\Meta::class => null, + Magento\SalesSequence\Model\SequenceFactory::class => null, + Magento\SalesSequence\Model\Manager::class => null, + Magento\Quote\Model\ResourceModel\Collection\Interceptor::class => null, + Magento\Quote\Model\ResourceModel\Quote\Collection\Interceptor::class => null, + Magento\Quote\Api\Data\ProductOptionInterfaceFactory::class => null, + Magento\Quote\Model\Quote\Item\Interceptor::class => null, + Magento\Quote\Model\Quote\Address\Interceptor::class => null, Magento\Quote\Model\ResourceModel\Quote::class => null, + Magento\Quote\Model\QuoteIdToMaskedQuoteId::class => null, + Magento\Quote\Model\Quote\Address\Total\Collector::class => null, + Magento\Quote\Model\Quote\TotalsCollectorList::class => null, + Magento\Quote\Model\Quote\TotalsCollector::class => null, Magento\Quote\Model\Quote::class => null, - Magento\Backend\Model\Session::class => null, - Magento\Checkout\Model\Session::class => null, - Magento\Quote\Model\ResourceModel\Quote\Item::class => null, - Magento\Backend\Model\Menu\Config::class => null, - Magento\Backend\Model\Url::class => null, + Magento\Quote\Model\Quote\ProductOptionFactory::class => null, + Magento\Quote\Api\Data\ProductOptionExtensionFactory::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableRowSizeEstimator::class => null, + Magento\Catalog\Model\Indexer\Price\BatchSizeManagement::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\DefaultPrice::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\CompositeProductRelationsCalculator::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\CompositeProductRowSizeEstimator::class => null, + Magento\Catalog\Model\Indexer\Price\CompositeProductBatchSizeManagement::class => null, + Magento\Catalog\Model\Indexer\Product\Price\TableMaintainer::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructureFactory::class => null, + Magento\Catalog\Model\ResourceModel\Product\Attribute\Backend\Tierprice::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\TierPrice::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\CompositeProductBatchSizeAdjuster::class => null, + Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\BatchSizeCalculator::class => null, + Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection::class => null, + Magento\Catalog\Model\Product\Attribute\Repository::class => null, + Magento\Catalog\Model\ResourceModel\Product::class => null, + Magento\Catalog\Model\ProductRepository::class => null, + Magento\Catalog\Model\Product\Type::class => null, + Magento\Catalog\Model\Product\Link::class => null, Magento\Customer\Model\Indexer\AttributeProvider::class => null, - Magento\Framework\App\Cache\FlushCacheByTags::class => null, - Magento\CustomerGraphQl\Model\Context\AddUserInfoToContext::class => null, - Magento\Eav\Helper\Data::class => null, - ], - 'updateCustomer' => [ - Magento\Framework\Url\QueryParamsResolver::class => null, - Magento\Framework\Registry::class => null, - Magento\Customer\Model\AddressRegistry::class => null, + Magento\Customer\Model\ResourceModel\Customer::class => null, + Magento\Customer\Model\ResourceModel\CustomerRepository::class => null, + Magento\Customer\Model\Session\Validators\CutoffValidator::class => null, + Magento\Customer\Model\Customer::class => null, + Magento\Customer\Model\Session\SessionCleaner::class => null, + Magento\Customer\Model\ResourceModel\AddressRepository::class => null, Magento\Customer\Model\CustomerRegistry::class => null, - Magento\Eav\Model\ResourceModel\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\VersionControl\Metadata::class => null, - 'CustomerAddressSnapshot' => null, Magento\Customer\Model\ResourceModel\Address\Relation::class => null, - Magento\Framework\Validator\Factory::class => null, - Magento\Customer\Api\CustomerRepositoryInterface\Proxy::class => null, Magento\Customer\Model\ResourceModel\Address::class => null, - Magento\Framework\Translate\Inline\ConfigInterface\Proxy::class => null, - Magento\Framework\Translate\Inline::class => null, - Magento\Framework\Json\Helper\Data::class => null, - Magento\Directory\Helper\Data::class => null, - Magento\TestFramework\Api\Config\Reader\FileResolver::class => null, - Magento\Framework\Api\ExtensionAttribute\JoinProcessor::class => null, - Magento\Customer\Model\ResourceModel\AddressRepository::class => null, - Magento\Framework\Reflection\MethodsMap::class => null, - Magento\Framework\Reflection\ExtensionAttributesProcessor\Proxy::class => null, - Magento\Framework\Reflection\DataObjectProcessor::class => null, - Magento\Framework\Api\DataObjectHelper::class => null, Magento\Customer\Model\AttributeMetadataConverter::class => null, - Magento\Customer\Model\AttributeMetadataDataProvider::class => null, Magento\Customer\Model\Metadata\CustomerMetadata::class => null, Magento\Customer\Model\Metadata\AttributeMetadataCache::class => null, Magento\Customer\Model\Metadata\CustomerCachedMetadata::class => null, Magento\Customer\Model\Config\Share::class => null, - 'EavVersionControlSnapshot' => null, - Magento\Customer\Model\AccountConfirmation::class => null, - Magento\Customer\Model\ResourceModel\Customer::class => null, - Magento\Framework\Api\ImageProcessor::class => null, Magento\Customer\Model\Session\Proxy::class => null, Magento\Customer\Model\Delegation\Storage::class => null, - Magento\Customer\Model\GroupRegistry::class => null, - Magento\Framework\Model\ResourceModel\Db\VersionControl\Metadata::class => null, - Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot::class => null, - Magento\Tax\Model\TaxClass\Repository::class => null, Magento\Customer\Model\ResourceModel\GroupRepository::class => null, - Magento\Customer\Model\ResourceModel\CustomerRepository::class => null, Magento\Customer\Helper\View::class => null, - Magento\Framework\Indexer\IndexerRegistry::class => null, - Magento\Customer\Model\Customer::class => null, - Magento\Framework\Session\SessionMaxSizeConfig::class => null, - Magento\Framework\Session\SaveHandler::class => null, - Magento\Framework\Session\Storage::class => null, - Magento\Paypal\Plugin\TransparentSessionChecker::class => null, - Laminas\Uri\Uri::class => null, - Magento\Backend\App\Area\FrontNameResolver::class => null, - Magento\Backend\Helper\Data::class => null, - Magento\GraphQl\Plugin\DisableSession::class => null, - Magento\Framework\Session\Generic::class => null, - Magento\Customer\Model\Session\SessionCleaner::class => null, Magento\Customer\Model\Authorization\CustomerSessionUserContext::class => null, - Magento\JwtUserToken\Model\ConfigurableJwtSettingsProvider::class => null, - Magento\JwtUserToken\Model\Reader::class => null, - Magento\JwtUserToken\Model\ResourceModel\FastStorageRevokedWrapper::class => null, - Magento\Webapi\Model\Authorization\TokenUserContext::class => null, - Magento\Authorization\Model\CompositeUserContext::class => null, - Magento\Webapi\Model\WebapiRoleLocator::class => null, Magento\Customer\Model\Authentication::class => null, - Magento\Customer\Model\AccountManagement::class => null, - Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\Communication::class => null, - Magento\Framework\Webapi\ServiceInputProcessor::class => null, - Magento\Framework\MessageQueue\Publisher\Config\RemoteService\Reader::class => null, Magento\Customer\Model\Session::class => null, - Magento\Customer\Model\Plugin\CustomerFlushFormKey::class => null, - Magento\CustomerGraphQl\Model\Context\AddUserInfoToContext::class => null, - Magento\Tax\Model\Calculation::class => null, - Magento\Catalog\Helper\Data::class => null, - Magento\Checkout\Model\Session::class => null, - Magento\Bundle\Pricing\Price\TaxPrice::class => null, - Magento\Eav\Model\AttributeDataFactory::class => null, - Magento\Customer\Observer\AfterAddressSaveObserver::class => null, - Magento\LoginAsCustomer\Model\GetLoggedAsCustomerAdminId::class => null, - Magento\LoginAsCustomerAssistance\Model\SetAssistance::class => null, - Magento\LoginAsCustomerAssistance\Plugin\CustomerPlugin::class => null, - Magento\CustomerGraphQl\Plugin\ClearCustomerSessionAfterRequest::class => null, - Magento\Framework\Module\ModuleList::class => null, - Magento\Framework\Module\Manager::class => null, - Magento\Framework\Translate\Inline\Proxy::class => null, - ], - 'updateCustomerAddress' => [ - Magento\Framework\Url\QueryParamsResolver::class => null, - Magento\Framework\Registry::class => null, Magento\Customer\Model\AddressRegistry::class => null, - Magento\Customer\Model\CustomerRegistry::class => null, - Magento\Eav\Model\ResourceModel\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\VersionControl\Metadata::class => null, - 'CustomerAddressSnapshot' => null, - Magento\Customer\Model\ResourceModel\Address\Relation::class => null, - Magento\Framework\Validator\Factory::class => null, - Magento\Customer\Api\CustomerRepositoryInterface\Proxy::class => null, - Magento\Customer\Model\ResourceModel\Address::class => null, - Magento\Framework\Translate\Inline\ConfigInterface\Proxy::class => null, - Magento\Framework\Translate\Inline::class => null, - Magento\Framework\Json\Helper\Data::class => null, - Magento\Directory\Helper\Data::class => null, - Magento\TestFramework\Api\Config\Reader\FileResolver::class => null, - Magento\Framework\Api\ExtensionAttribute\JoinProcessor::class => null, - Magento\Customer\Model\ResourceModel\AddressRepository::class => null, - Magento\Framework\Reflection\MethodsMap::class => null, - Magento\Framework\Reflection\ExtensionAttributesProcessor\Proxy::class => null, - Magento\Framework\Reflection\DataObjectProcessor::class => null, - Magento\Framework\Api\DataObjectHelper::class => null, - Magento\Customer\Model\AttributeMetadataConverter::class => null, Magento\Customer\Model\AttributeMetadataDataProvider::class => null, - Magento\Customer\Model\Metadata\CustomerMetadata::class => null, - Magento\Customer\Model\Metadata\AttributeMetadataCache::class => null, - Magento\Customer\Model\Metadata\CustomerCachedMetadata::class => null, - Magento\Customer\Model\Config\Share::class => null, - 'EavVersionControlSnapshot' => null, Magento\Customer\Model\AccountConfirmation::class => null, - Magento\Customer\Model\ResourceModel\Customer::class => null, - Magento\Framework\Api\ImageProcessor::class => null, - Magento\Customer\Model\Session\Proxy::class => null, - Magento\Customer\Model\Delegation\Storage::class => null, - Magento\Tax\Model\TaxClass\Repository::class => null, - Magento\Customer\Model\ResourceModel\CustomerRepository::class => null, - Magento\Customer\Helper\View::class => null, - Magento\Framework\Indexer\IndexerRegistry::class => null, - Magento\Customer\Model\Customer::class => null, - Magento\Framework\Session\SessionMaxSizeConfig::class => null, - Magento\Framework\Session\SaveHandler::class => null, - Magento\Framework\Session\Storage::class => null, - Magento\Paypal\Plugin\TransparentSessionChecker::class => null, - Laminas\Uri\Uri::class => null, - Magento\Backend\App\Area\FrontNameResolver::class => null, - Magento\Backend\Helper\Data::class => null, - Magento\GraphQl\Plugin\DisableSession::class => null, - Magento\Framework\Session\Generic::class => null, - Magento\Customer\Model\Session\SessionCleaner::class => null, - Magento\Customer\Model\Authorization\CustomerSessionUserContext::class => null, - Magento\JwtUserToken\Model\ConfigurableJwtSettingsProvider::class => null, - Magento\JwtUserToken\Model\Reader::class => null, - Magento\JwtUserToken\Model\ResourceModel\FastStorageRevokedWrapper::class => null, - Magento\Webapi\Model\Authorization\TokenUserContext::class => null, - Magento\Authorization\Model\CompositeUserContext::class => null, - Magento\Customer\Model\Authentication::class => null, Magento\Customer\Model\AccountManagement::class => null, - Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\Communication::class => null, - Magento\Framework\Webapi\ServiceInputProcessor::class => null, - Magento\Framework\MessageQueue\Publisher\Config\RemoteService\Reader::class => null, - Magento\Customer\Model\Session::class => null, Magento\Customer\Model\Plugin\CustomerFlushFormKey::class => null, - Magento\CustomerGraphQl\Model\Context\AddUserInfoToContext::class => null, - Magento\Tax\Model\Calculation::class => null, - Magento\Eav\Model\AttributeDataFactory::class => null, - Magento\Customer\Observer\AfterAddressSaveObserver::class => null, - Magento\LoginAsCustomer\Model\GetLoggedAsCustomerAdminId::class => null, - Magento\Framework\App\View::class => null, - Magento\Framework\App\Action\Context::class => null, - Magento\Catalog\Helper\Data::class => null, - Magento\Checkout\Model\Session::class => null, - Magento\Bundle\Pricing\Price\TaxPrice::class => null, - Magento\CustomerGraphQl\Plugin\ClearCustomerSessionAfterRequest::class => null, - Magento\Framework\Module\ModuleList::class => null, - Magento\Framework\Module\Manager::class => null, - Magento\Framework\Translate\Inline\Proxy::class => null, - ], - 'updateCustomerEmail' => [ - Magento\Framework\Url\QueryParamsResolver::class => null, - Magento\Framework\Registry::class => null, - Magento\Customer\Model\AddressRegistry::class => null, - Magento\Customer\Model\CustomerRegistry::class => null, + Magento\Customer\Observer\LogLastLoginAtObserver::class => null, + Magento\Customer\Model\Visitor\Proxy::class => null, + Magento\Customer\Observer\LogLastLoginAtObserver::class => null, + Magento\Customer\Api\CustomerRepositoryInterface\Proxy::class => null, + Magento\Customer\Model\ResourceModel\Attribute::class => null, + Magento\Customer\Model\Address\Config::class => null, + Magento\Indexer\Model\Indexer::class => null, + Magento\Indexer\Model\Indexer\DependencyDecorator::class => null, + Magento\Indexer\Model\Indexer\DeferredCacheContext::class => null, + Magento\Indexer\Model\Indexer\DeferredCacheCleaner::class => null, + Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\ExtractDataFromCategoryTree::class => null, Magento\Eav\Model\ResourceModel\Entity\Attribute\Set::class => null, Magento\Eav\Model\Entity\Attribute\Set::class => null, Magento\Eav\Model\Entity\VersionControl\Metadata::class => null, - 'CustomerAddressSnapshot' => null, - Magento\Customer\Model\ResourceModel\Address\Relation::class => null, - Magento\Framework\Validator\Factory::class => null, - Magento\Customer\Api\CustomerRepositoryInterface\Proxy::class => null, - Magento\Customer\Model\ResourceModel\Address::class => null, - Magento\Framework\Translate\Inline\ConfigInterface\Proxy::class => null, - Magento\Framework\Translate\Inline::class => null, - Magento\Framework\Json\Helper\Data::class => null, + Magento\Eav\Plugin\Model\ResourceModel\Entity\Attribute::class => null, + Magento\Store\Model\GroupRepository::class => null, + Magento\Bundle\Model\CartItemProcessor::class => null, + Magento\ConfigurableProduct\Model\Quote\Item\CartItemProcessor::class => null, + Magento\ConfigurableProduct\Model\ResourceModel\Product\Indexer\Price\OptionsSelectBuilder::class => null, + Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class => null, + Magento\Payment\Gateway\Config\ConfigFactory::class => null, + Magento\Payment\Gateway\Data\Quote\AddressAdapterFactory::class => null, + Magento\Catalog\Model\ResourceModel\Category::class => null, + Magento\CatalogGraphQl\Model\Resolver\Products\SearchCriteria\CollectionProcessor\FilterProcessor\CategoryFilter::class => null, + Magento\Tax\Model\Quote\ToOrderConverter::class => null, + Magento\Store\Model\WebsiteManagement::class => null, + Magento\CatalogRule\Model\ResourceModel\Rule\Product\Price::class => null, + Magento\CatalogRule\Model\Indexer\ProductPriceIndexModifier::class => null, + Magento\InventoryConfigurableProduct\Pricing\Price\Indexer\BaseStockStatusSelectProcessor::class => null, + Magento\InventoryConfigurableProduct\Pricing\Price\Indexer\OptionsIndexer::class => null, + Magento\InventoryCatalog\Plugin\CatalogInventory\Model\Indexer\ModifySelectInProductPriceIndexFilter::class => null, + Magento\Indexer\Model\Indexer\DeferCacheCleaning::class => null, + Magento\Reward\Model\SalesRule\RewardPointCounter::class => null, + + Magento\LoginAsCustomerAssistance\Model\IsAssistanceEnabled::class => null, + Magento\LoginAsCustomerAssistance\Model\SetAssistance::class => null, + Magento\LoginAsCustomerAssistance\Plugin\CustomerPlugin::class => null, + Magento\Config\Model\Config\Processor\EnvironmentPlaceholder::class => null, + Magento\GraphQlNewRelic\Plugin\ReportError::class => null, + Magento\CatalogInventory\Model\StockRegistryProvider::class => null, + Magento\CatalogInventory\Model\StockRegistry::class => null, + Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter::class => null, + Magento\Tax\Model\Calculation::class => null, + Magento\Tax\Model\TaxCalculation::class => null, + Magento\SalesRule\Model\RulesApplier::class => null, + Magento\OfflineShipping\Model\SalesRule\Calculator::class => null, + Magento\OfflineShipping\Model\Quote\Address\FreeShipping::class => null, + Magento\SalesRule\Model\Validator::class => null, + Magento\User\Helper\Data::class => null, + Magento\Authorization\Model\RoleFactory::class => null, + Magento\User\Model\UserValidationRules::class => null, + Magento\User\Model\Backend\Config\ObserverConfig::class => null, + Magento\User\Model\ResourceModel\User::class => null, + Magento\User\Model\Notificator::class => null, + Magento\TestModuleCatalogInventoryCache\Plugin\PreventCachingPreloadedStockDataInToStockRegistry::class => null, + Magento\Catalog\Model\CustomOptions\CustomOptionProcessor::class => null, + 'orderMetadata' => null, + Magento\InventorySalesAsyncOrder\Model\ReservationExecution::class => null, + Magento\Payment\Api\Data\PaymentAdditionalInfoInterfaceFactory::class => null, + Magento\InventorySalesAsyncOrder\Plugin\SkipAsyncOrderCheckDataWithNoDeferredStockUpdatePlugin::class => null, + Magento\InventoryInStorePickup\Model\ExtractPickupLocationAddressData::class => null, + Magento\InventoryInStorePickupQuote\Model\ExtractQuoteAddressShippingAddressData::class => null, + Magento\InventoryInStorePickupQuote\Model\GetShippingAddressData::class => null, + Magento\InventoryInStorePickupQuote\Model\IsPickupLocationShippingAddress::class => null, + Magento\InventoryInStorePickupQuote\Model\ToQuoteAddress::class => null, + Magento\InventoryInStorePickupQuote\Model\GetWebsiteCodeByStoreId::class => null, + Magento\InventoryInStorePickupQuote\Plugin\Quote\ReplaceShippingAddressForShippingAddressManagement::class => null, + Magento\CustomerCustomAttributes\Model\ResourceModel\Sales\Quote::class => null, + Magento\NegotiableQuote\Model\Plugin\Quote\Model\ShippingAssignmentPersisterPlugin::class => null, + Magento\PurchaseOrder\Plugin\Quote\Model\QuoteRepositoryPlugin::class => null, + Magento\Catalog\Model\Config::class => null, + Magento\Downloadable\Model\Url\DomainValidator::class => null, + Magento\Staging\Model\VersionManager::class => null, + Magento\Staging\Model\Url\BaseUrlModifier::class => null, + Magento\Staging\Model\Event\Manager::class => null, + Magento\CatalogStaging\Plugin\Catalog\Model\Indexer\AbstractFlatState::class => null, Magento\Directory\Helper\Data::class => null, - Magento\TestFramework\Api\Config\Reader\FileResolver::class => null, - Magento\Framework\Api\ExtensionAttribute\JoinProcessor::class => null, - Magento\Customer\Model\ResourceModel\AddressRepository::class => null, - Magento\Framework\Reflection\MethodsMap::class => null, - Magento\Framework\Reflection\ExtensionAttributesProcessor\Proxy::class => null, - Magento\Framework\Reflection\DataObjectProcessor::class => null, - Magento\Framework\Api\DataObjectHelper::class => null, - Magento\Customer\Model\AttributeMetadataConverter::class => null, - Magento\Customer\Model\AttributeMetadataDataProvider::class => null, - Magento\Customer\Model\Metadata\CustomerMetadata::class => null, - Magento\Customer\Model\Metadata\AttributeMetadataCache::class => null, - Magento\Customer\Model\Metadata\CustomerCachedMetadata::class => null, - Magento\Customer\Model\Config\Share::class => null, - 'EavVersionControlSnapshot' => null, - Magento\Customer\Model\AccountConfirmation::class => null, - Magento\Customer\Model\ResourceModel\Customer::class => null, - Magento\Framework\Api\ImageProcessor::class => null, - Magento\Customer\Model\Session\Proxy::class => null, - Magento\Customer\Model\Delegation\Storage::class => null, - Magento\Customer\Model\GroupRegistry::class => null, - Magento\Framework\Model\ResourceModel\Db\VersionControl\Metadata::class => null, - Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot::class => null, - Magento\Tax\Model\TaxClass\Repository::class => null, - Magento\Customer\Model\ResourceModel\GroupRepository::class => null, - Magento\Customer\Model\ResourceModel\CustomerRepository::class => null, - Magento\Customer\Helper\View::class => null, - Magento\Framework\Indexer\IndexerRegistry::class => null, - Magento\Customer\Model\Customer::class => null, - Magento\Framework\Session\SessionMaxSizeConfig::class => null, - Magento\Framework\Session\SaveHandler::class => null, - Magento\Framework\Session\Storage::class => null, + Magento\Store\Model\Address\Renderer::class => null, + Magento\QuoteGraphQl\Plugin\ProductAttributesExtender::class => null, + Magento\Paypal\Plugin\TransparentSessionChecker::class => null, - Laminas\Uri\Uri::class => null, Magento\Backend\App\Area\FrontNameResolver::class => null, Magento\Backend\Helper\Data::class => null, Magento\GraphQl\Plugin\DisableSession::class => null, - Magento\Framework\Session\Generic::class => null, - Magento\Customer\Model\Session\SessionCleaner::class => null, - Magento\Customer\Model\Authorization\CustomerSessionUserContext::class => null, - Magento\JwtUserToken\Model\ConfigurableJwtSettingsProvider::class => null, - Magento\JwtUserToken\Model\Reader::class => null, + Magento\Tax\Model\TaxClass\Repository::class => null, Magento\JwtUserToken\Model\ResourceModel\FastStorageRevokedWrapper::class => null, Magento\Webapi\Model\Authorization\TokenUserContext::class => null, Magento\Authorization\Model\CompositeUserContext::class => null, Magento\Webapi\Model\WebapiRoleLocator::class => null, - Magento\Customer\Model\Authentication::class => null, - Magento\Customer\Model\AccountManagement::class => null, - Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\Communication::class => null, - Magento\Framework\Webapi\ServiceInputProcessor::class => null, - Magento\Framework\MessageQueue\Publisher\Config\RemoteService\Reader::class => null, - Magento\Customer\Model\Session::class => null, - Magento\Customer\Model\Plugin\CustomerFlushFormKey::class => null, - Magento\CustomerGraphQl\Model\Context\AddUserInfoToContext::class => null, - Magento\Tax\Model\Calculation::class => null, + 'CustomerAddressSnapshot' => null, + 'EavVersionControlSnapshot' => null, + Magento\CustomerGraphQl\Model\Customer\ValidateCustomerData\ValidateEmail::class => null, + Magento\CustomerGraphQl\Model\Customer\ValidateCustomerData::class => null, Magento\Catalog\Helper\Data::class => null, + + Magento\Eav\Model\AttributeDataFactory::class => null, Magento\Checkout\Model\Session::class => null, + + Magento\JwtUserToken\Model\ConfigurableJwtSettingsProvider::class => null, + Magento\JwtUserToken\Model\Reader::class => null, + Magento\Bundle\Pricing\Price\TaxPrice::class => null, - Magento\Eav\Model\AttributeDataFactory::class => null, Magento\Customer\Observer\AfterAddressSaveObserver::class => null, Magento\LoginAsCustomer\Model\GetLoggedAsCustomerAdminId::class => null, Magento\CustomerGraphQl\Plugin\ClearCustomerSessionAfterRequest::class => null, - Magento\Framework\Module\ModuleList::class => null, - Magento\Framework\Module\Manager::class => null, - Magento\GraphQlCache\Model\Plugin\Auth\TokenIssuer::class => null, - Magento\Framework\Validator\EmailAddress::class => null, - Magento\CustomerGraphQl\Model\Customer\ValidateCustomerData\ValidateEmail::class => null, - Magento\CustomerGraphQl\Model\Customer\ValidateCustomerData::class => null, - Magento\Framework\App\View::class => null, - Magento\Framework\App\Action\Context::class => null, - Magento\Quote\Model\Quote\Address\Total\Collector::class => null, - ], - 'generateCustomerToken' => [ - Magento\Customer\Model\CustomerRegistry::class => null, - Magento\Eav\Model\ResourceModel\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\Attribute\Set::class => null, - Magento\Eav\Model\Entity\VersionControl\Metadata::class => null, - 'CustomerAddressSnapshot' => null, - Magento\Customer\Model\ResourceModel\Address\Relation::class => null, - Magento\Customer\Api\CustomerRepositoryInterface\Proxy::class => null, - Magento\Customer\Model\ResourceModel\Address::class => null, - Magento\Framework\Translate\Inline\ConfigInterface\Proxy::class => null, - Magento\Framework\Translate\Inline::class => null, - Magento\Framework\Json\Helper\Data::class => null, - Magento\Directory\Helper\Data::class => null, - Magento\TestFramework\Api\Config\Reader\FileResolver::class => null, - Magento\Framework\Api\ExtensionAttribute\JoinProcessor::class => null, - Magento\Customer\Model\ResourceModel\AddressRepository::class => null, - Magento\Framework\Reflection\MethodsMap::class => null, - Magento\Framework\Reflection\ExtensionAttributesProcessor\Proxy::class => null, - Magento\Framework\Reflection\DataObjectProcessor::class => null, - Magento\Framework\Api\DataObjectHelper::class => null, - Magento\Customer\Model\AttributeMetadataConverter::class => null, - Magento\Customer\Model\AttributeMetadataDataProvider::class => null, - Magento\Customer\Model\Metadata\CustomerMetadata::class => null, - Magento\Customer\Model\Metadata\AttributeMetadataCache::class => null, - Magento\Customer\Model\Metadata\CustomerCachedMetadata::class => null, - Magento\Customer\Model\Config\Share::class => null, - 'EavVersionControlSnapshot' => null, - Magento\Customer\Model\ResourceModel\Customer::class => null, - Magento\Framework\Api\ImageProcessor::class => null, - Magento\Customer\Model\Session\Proxy::class => null, - Magento\Customer\Model\Delegation\Storage::class => null, - Magento\Tax\Model\TaxClass\Repository::class => null, - Magento\Customer\Model\ResourceModel\CustomerRepository::class => null, - Magento\Customer\Helper\View::class => null, - Magento\Customer\Model\Customer::class => null, - Magento\Framework\Session\SessionMaxSizeConfig::class => null, - Magento\Framework\Session\SaveHandler::class => null, - Magento\Framework\Session\Storage::class => null, - Magento\Paypal\Plugin\TransparentSessionChecker::class => null, Laminas\Uri\Uri::class => null, - Magento\Backend\App\Area\FrontNameResolver::class => null, - Magento\Backend\Helper\Data::class => null, - Magento\GraphQl\Plugin\DisableSession::class => null, - Magento\Framework\Session\Generic::class => null, - Magento\Customer\Model\Session\SessionCleaner::class => null, - Magento\Customer\Model\Authorization\CustomerSessionUserContext::class => null, - Magento\JwtUserToken\Model\ConfigurableJwtSettingsProvider::class => null, - Magento\JwtUserToken\Model\Reader::class => null, - Magento\JwtUserToken\Model\ResourceModel\FastStorageRevokedWrapper::class => null, - Magento\Webapi\Model\Authorization\TokenUserContext::class => null, - Magento\Authorization\Model\CompositeUserContext::class => null, - Magento\Customer\Model\Authentication::class => null, - Magento\Customer\Model\Session::class => null, - Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\Communication::class => null, - Magento\Framework\Webapi\ServiceInputProcessor::class => null, - Magento\Framework\MessageQueue\Publisher\Config\RemoteService\Reader::class => null, - ], - '*' => [ Magento\TestFramework\Interception\PluginList::class => null, // memory leak, wrong sql, potential issues - Magento\Framework\Event\Config\Data::class => null, - Magento\Framework\App\AreaList::class => null, - Magento\Framework\App\DeploymentConfig::class => null, Magento\Theme\Model\View\Design::class => null, - Magento\Framework\App\Cache\Frontend\Pool::class => null, - Magento\Framework\App\Cache\Type\FrontendPool::class => null, - Magento\Framework\App\DeploymentConfig\Writer::class => null, - Magento\Framework\App\Cache\State::class => null, - Magento\Framework\Module\ModuleList::class => null, Magento\RemoteStorage\Model\Config::class => null, Magento\Store\Model\Config\Processor\Fallback::class => null, Magento\Framework\Lock\LockBackendFactory::class => null, 'customRemoteFilesystem' => null, 'systemConfigQueryLocker' => null, - Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile::class => null, Magento\Config\App\Config\Source\RuntimeConfigSource::class => null, 'scopesConfigInitialDataProvider' => null, Magento\Developer\Model\Logger\Handler\Debug::class => null, Magento\Developer\Model\Logger\Handler\Syslog::class => null, Magento\Store\App\Config\Source\RuntimeConfigSource::class => null, Magento\Store\App\Config\Type\Scopes::class => null, - Magento\Framework\Module\Dir\Reader::class => null, - Magento\Framework\Module\PackageInfo::class => null, - Magento\Framework\App\Language\Dictionary::class => null, - Magento\Framework\ObjectManager\ConfigInterface::class => null, - Magento\Framework\App\Cache\Type\Config::class => null, - Magento\Framework\Interception\PluginListGenerator::class => null, Magento\TestFramework\App\Config::class => null, Magento\TestFramework\Request::class => null, - Magento\Framework\View\FileSystem::class => null, - Magento\Framework\App\Config\FileResolver::class => null, Magento\TestFramework\ErrorLog\Logger::class => null, + Magento\TestFramework\Db\Adapter\Mysql\Interceptor::class => null, + Magento\TestFramework\Mail\Template\TransportBuilderMock::class => null, + Magento\TestFramework\Api\Config\Reader\FileResolver::class => null, 'translationConfigSourceAggregated' => null, - Magento\Framework\App\Request\Http\Proxy::class => null, - Magento\Framework\Event\Config\Reader\Proxy::class => null, Magento\Theme\Model\View\Design\Proxy::class => null, Magento\Translation\Model\Source\InitialTranslationSource\Proxy::class => null, Magento\Translation\App\Config\Type\Translation::class => null, Magento\Backend\App\Request\PathInfoProcessor\Proxy::class => null, - Magento\Framework\View\Asset\Source::class => null, - Magento\Framework\Translate\ResourceInterface\Proxy::class => null, - Magento\Framework\Locale\Resolver\Proxy::class => null, Magento\MediaStorage\Helper\File\Storage\Database::class => null, - Magento\Framework\App\Cache\Proxy::class => null, - Magento\Framework\Translate::class => null, Magento\Store\Model\StoreManager::class => null, - Magento\Framework\App\Http\Context::class => null, Magento\TestFramework\Response::class => null, Magento\Store\Model\WebsiteRepository::class => null, - Magento\Framework\Locale\Resolver::class => null, - Magento\Store\Model\GroupRepository::class => null, Magento\Store\Model\StoreRepository::class => null, - Magento\Framework\View\Design\Fallback\RulePool::class => null, - Magento\Framework\View\Asset\Repository::class => null, - Magento\Framework\HTTP\Header::class => null, - Magento\Framework\App\Route\Config::class => null, Magento\Store\Model\System\Store::class => null, Magento\AwsS3\Driver\CredentialsCache::class => null, Magento\Eav\Model\Config::class => null, 'AssetPreProcessorPool' => null, Magento\GraphQl\Model\Query\ContextFactory::class => null, 'viewFileMinifiedFallbackResolver' => null, - Magento\Framework\View\Asset\Minification::class => null, - Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection::class => null, - Magento\Framework\Url::class => null, - Magento\Framework\HTTP\PhpEnvironment\RemoteAddress::class => null, - Magento\Framework\Module\ModuleList::class => null, - Magento\Framework\Module\Manager::class => null, /* AddUserInfoToContext has userContext changed by Magento\GraphQl\Model\Query\ContextFactory, * but we need to make this more robust in secure in case of unforeseen bugs. * resetState for userContext makes sense, but we need to make sure that it cannot copy current userContext. */ Magento\CustomerGraphQl\Model\Context\AddUserInfoToContext::class => null, // FIXME: see above comment - Magento\Framework\ObjectManager\DefinitionInterface::class => null, Magento\TestFramework\App\State::class => null, Magento\GraphQl\App\State\SkipListAndFilterList::class => null, // Yes, our test uses mutable state itself :-) - Magento\Framework\App\ResourceConnection::class => null, - Magento\Framework\App\ResourceConnection\Interceptor::class => null, - Magento\Framework\Session\SaveHandler::class => null, // TODO: check this - Magento\TestFramework\Db\Adapter\Mysql\Interceptor::class => null, + Magento\InventorySales\Model\IsProductSalableForRequestedQtyCondition\IsProductSalableForRequestedQtyConditionChain::class => null, + Magento\InventorySales\Model\AreProductsSalableForRequestedQty::class => null, + Magento\Customer\Model\GroupRegistry::class => null, + Magento\Config\App\Config\Type\System::class => null, + Magento\CatalogRule\Observer\RulePricesStorage::class => null, + Magento\CatalogRule\Observer\PrepareCatalogProductCollectionPricesObserver::class => null, + Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList::class => null, + Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option::class => null, + Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\StockItem::class => null, + Magento\CatalogRule\Observer\ProcessFrontFinalPriceObserver::class => null, + Magento\SalesRule\Model\Coupon\CodeLimitManager::class => null, + Magento\SalesRule\Observer\CouponCodeValidation::class => null, + Magento\CatalogInventory\Helper\Stock::class => null, + Magento\Downloadable\Model\Product\Type::class => null, + Magento\Bundle\Model\Product\Type::class => null, + Magento\CatalogInventory\Observer\AddInventoryDataObserver::class => null, + Magento\Downloadable\Model\Quote\Item\CartItemProcessor::class => null, + Magento\Staging\Model\Update\VersionHistory::class => null, + Magento\Staging\Model\UpdateRepository::class => null, + Magento\GraphQlCache\Model\Plugin\Auth\TokenIssuer::class => null, + Magento\GraphQlCache\Model\Plugin\Auth\TokenExtractor::class => null, + Magento\CustomerSegment\Model\ResourceModel\Segment\CollectionFactory::class => null, + Magento\CustomerSegment\Model\ResourceModel\Customer::class => null, + Magento\CustomerSegment\Model\Customer::class => null, + Magento\CustomerSegment\Observer\ProcessEventGenericObserver::class => null, + Magento\CustomerSegment\Model\ResourceModel\Helper::class => null, + Magento\Quote\Model\Quote\Relation::class => null, + Magento\Quote\Model\QueryResolver::class => null, + Magento\CustomerCustomAttributes\Model\Sales\QuoteFactory::class => null, + Magento\CustomerCustomAttributes\Model\Quote\Relation::class => null, + 'QuoteRelationsComposite' => null, + Magento\GraphQlCache\Model\Plugin\Auth\TokenIssuer::class => null, + Magento\StoreGraphQl\Plugin\LocalizeEmail::class => null, ], '*-fromConstructed' => [ + Magento\Sales\Model\ResourceModel\Grid::class => null, + Magento\Sales\Model\ResourceModel\GridPool::class => null, + Magento\Sales\Api\Data\OrderExtension::class => null, + Magento\Sales\Observer\GridSyncInsertObserver\Interceptor::class => null, + Magento\Staging\Model\UpdateRepositoryCache::class => null, + Magento\PageBuilder\Model\Filter\Template::class => null, + Magento\PageBuilder\Plugin\Filter\TemplatePlugin::class => null, + Magento\Customer\Api\Data\CustomerExtension::class => null, + Magento\Framework\Css\PreProcessor\Adapter\CssInliner::class => null, Magento\GraphQl\App\State\ObjectManager::class => null, Magento\RemoteStorage\Filesystem::class => null, Magento\Framework\App\Cache\Frontend\Factory::class => null, @@ -623,7 +448,6 @@ Magento\Customer\Model\Attribute\Interceptor::class => null, Magento\Framework\GraphQl\Schema\SchemaGenerator::class => null, Magento\Customer\Model\ResourceModel\Customer::class => null, - Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot::class => null, Magento\Framework\App\PageCache\Version::class => null, Magento\Framework\App\PageCache\Identifier::class => null, Magento\Framework\App\PageCache\Kernel::class => null, @@ -687,6 +511,220 @@ null, // TODO: confirm this gets reset from poison pill or is otherwise okay. Magento\Ui\Config\Converter::class => null, // TODO: confirm this is cleaned when poison pill triggered + Magento\SalesRule\Model\ResourceModel\Rule::class => null, + Magento\SalesRule\Model\Plugin\QuoteConfigProductAttributes::class => null, + Magento\QuoteGraphQl\Plugin\ProductAttributesExtender::class => null, + + //Create Empty Cart + Magento\Quote\Model\ResourceModel\Quote\QuoteIdMask::class => null, + Magento\Quote\Model\ResourceModel\Quote::class => null, + Magento\Quote\Model\QuoteIdToMaskedQuoteId::class => null, + Magento\Quote\Model\Cart\CustomerCartResolver::class => null, + Magento\QuoteGraphQl\Model\Cart\CreateEmptyCartForGuest::class => null, + Magento\Quote\Model\MaskedQuoteIdToQuoteId::class => null, + Magento\SalesRule\Model\RulesApplier::class => null, + Magento\OfflineShipping\Model\SalesRule\Calculator::class => null, + Magento\Quote\Model\Quote\Address\Total\Shipping::class => null, + Magento\SalesRule\Model\Validator::class => null, + Magento\SalesRule\Model\Quote\Discount::class => null, + Magento\Weee\Model\Total\Quote\Weee::class => null, + Magento\Quote\Model\Quote\Address\Total\Collector::class => null, + Magento\Quote\Model\Quote\Interceptor::class => null, + Magento\Quote\Model\ResourceModel\Quote\Address::class => null, + Magento\Quote\Model\Quote\Address::class => null, + Magento\Quote\Model\ShippingMethodManagement::class => null, + Magento\Quote\Model\ResourceModel\Quote\Item\Collection\Interceptor::class => null, + Magento\Quote\Model\Quote\Address\Total::class => null, + Laminas\Validator\ValidatorChain::class => null, + Magento\CustomerCustomAttributes\Model\ResourceModel\Sales\Quote\Address::class => null, + Magento\CustomerCustomAttributes\Model\ResourceModel\Sales\Quote::class => null, + Magento\Indexer\Model\Indexer\DeferCacheCleaning::class => null, + Magento\ResourceConnections\App\DeploymentConfig::class => null, + Magento\Staging\Model\StagingList::class => null, + Magento\Staging\Model\ResourceModel\Update::class => null, + Magento\AdobeCommerceEventsClient\Event\EventList::class => null, + Magento\AdobeCommerceEventsClient\Event\Filter\EventFieldsFilter::class => null, + Magento\AdobeCommerceEventsClient\Event\EventStorageWriter::class => null, + Magento\TestModuleAdobeCommerceEvents\Plugin\Framework\ManagerInterfacePlugin::class => null, + + Magento\Catalog\Model\Product\Interceptor::class => null, + Magento\Catalog\Model\Product\Attribute\Backend\Price\Interceptor::class => null, + Magento\Catalog\Model\Product\Attribute\Backend\Tierprice\Interceptor::class => null, + Magento\Catalog\Model\Product\Attribute\Backend\Boolean\Interceptor::class => null, + Magento\Catalog\Model\Product\Attribute\Backend\LayoutUpdate\Interceptor::class => null, + Magento\Catalog\Model\Product\Attribute\Backend\Stock\Interceptor::class => null, + Magento\Catalog\Model\Product\Attribute\Backend\Weight\Interceptor::class => null, + Magento\Catalog\Model\ResourceModel\Product\CategoryLink::class => null, + Magento\Catalog\Model\Category\Link\ReadHandler::class => null, + Laminas\Validator\Uri::class => null, + Magento\Quote\Model\ResourceModel\Quote\Item::class => null, + Magento\Quote\Model\Quote\Item::class => null, + Magento\Quote\Model\ResourceModel\Quote\Item\Option::class => null, + Magento\Quote\Model\Quote\Item\Option::class => null, + Magento\User\Model\User\Interceptor::class => null, + Magento\Quote\Model\ShippingAssignment::class => null, + Magento\Quote\Model\Shipping::class => null, + Magento\GiftCard\Model\Attribute\Backend\Giftcard\Amount\Interceptor::class => null, + Magento\TargetRule\Model\Catalog\Product\Attribute\Backend\Rule\Interceptor::class => null, + Magento\NegotiableQuote\Model\NegotiableQuote\Interceptor::class => null, + Magento\CatalogRule\Observer\RulePricesStorage::class => null, + Magento\CatalogRule\Observer\PrepareCatalogProductCollectionPricesObserver::class => null, + Magento\Quote\Api\Data\CartExtension::class => null, + Magento\Catalog\Api\Data\ProductExtension::class => null, + Magento\CatalogRule\Observer\ProcessFrontFinalPriceObserver::class => null, + Magento\Quote\Api\Data\AddressExtension::class => null, + Magento\TestModuleAdobeCommerceEvents\Plugin\Framework\ManagerInterfacePlugin::class => null, + Magento\CatalogRule\Observer\ProcessFrontFinalPriceObserver\Interceptor::class => null, + Magento\Catalog\Model\Product\Type\Virtual\Interceptor::class => null, + Magento\NegotiableQuote\Model\NegotiableQuote\Interceptor::class => null, + Magento\CatalogInventory\Model\StockRegistryProvider::class => null, + Magento\CatalogInventory\Model\StockRegistry::class => null, + Magento\CatalogInventory\Helper\Stock::class => null, + Magento\Catalog\Model\Product\Link\Interceptor::class => null, + Magento\Catalog\Model\Config::class => null, + Magento\Bundle\Model\Product\Type\Interceptor::class => null, + Magento\Bundle\Model\Product\LinksList::class => null, + Magento\Bundle\Model\Product\OptionList::class => null, + Magento\Bundle\Model\Option\SaveAction::class => null, + Magento\Bundle\Model\OptionRepository::class => null, + Magento\CatalogInventory\Model\AddStockStatusToCollection::class => null, + Magento\Bundle\Model\ResourceModel\Option\Collection\Interceptor::class => null, + Magento\Bundle\Model\Link::class => null, + Magento\Bundle\Model\Option::class => null, + Magento\Bundle\Model\BundleOption::class => null, + Magento\Quote\Api\Data\ProductOptionExtension::class => null, + Magento\Quote\Model\Quote\ProductOption::class => null, + Magento\Catalog\Model\CategoryLink::class => null, + Magento\ConfigurableProduct\Model\Product\Type\Configurable\OptionValue::class => null, + Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute\Collection\Interceptor::class => null, + Magento\ConfigurableProduct\Model\Quote\Item\ConfigurableItemOptionValue::class => null, + Magento\Downloadable\Model\Product\Type\Interceptor::class => null, + Magento\Downloadable\Model\LinkRepository::class => null, + Magento\Downloadable\Model\SampleRepository::class => null, + Magento\Downloadable\Model\Link::class => null, + Magento\Downloadable\Model\ResourceModel\Sample\Collection\Interceptor::class => null, + Magento\Downloadable\Model\Sample::class => null, + Magento\Downloadable\Model\DownloadableOption::class => null, + Magento\Payment\Model\MethodList::class => null, + Magento\Quote\Model\PaymentMethodManagement::class => null, + Magento\Quote\Model\ResourceModel\Quote\Address\Rate::class => null, + Magento\Framework\ObjectManager\TMap::class => null, + Magento\Payment\Gateway\Config\ValueHandlerPool::class => null, + Magento\Payment\Model\Method\Adapter::class => null, + Magento\Tax\Model\Quote\GrandTotalDetailsPlugin::class => null, + Magento\Quote\Model\BillingAddressManagement::class => null, + Magento\QuoteGraphQl\Model\Cart\AssignBillingAddressToCart::class => null, + Magento\NegotiableQuote\Plugin\Quote\Api\JoinNegotiableQuoteTotalsPlugin::class => null, + Magento\Captcha\Helper\Data::class => null, + Magento\Checkout\Model\CaptchaRateLimiter::class => null, + Magento\Captcha\Model\DefaultModel::class => null, + Magento\Quote\Model\ResourceModel\Quote\Payment::class => null, + Magento\CustomerGraphQl\Plugin\ClearCustomerSessionAfterRequest::class => null, + Magento\Company\Plugin\Framework\Model\ActionValidator\RemoveActionPlugin::class => null, + Magento\Sales\Model\Order\ItemRepository\Interceptor::class => null, + Magento\Sales\Model\ResourceModel\Order\Interceptor::class => null, + Magento\Sales\Model\Order\Address\Validator::class => null, + Magento\Quote\Model\SubmitQuoteValidator::class => null, + Magento\Sales\Model\Order\Email\Sender\OrderSender::class => null, + Magento\Catalog\Model\Indexer\Product\Price\DimensionModeConfiguration::class => null, + Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver::class => null, + Magento\Sales\Model\Order\Config::class => null, + Magento\Sales\Model\Order\Interceptor::class => null, + Magento\Sales\Model\ResourceModel\Order\Address::class => null, + Magento\Sales\Model\Order\Address::class => null, + Magento\Sales\Model\Order\CreditmemoFactory::class => null, + Magento\Sales\Model\Order\Payment\Interceptor::class => null, + Magento\Sales\Model\ResourceModel\Order\Item::class => null, + Magento\Sales\Model\Order\Item\Interceptor::class => null, + Magento\OfflinePayments\Model\Checkmo::class => null, + Magento\Sales\Model\ResourceModel\Order\Status\Collection\Interceptor::class => null, + Magento\Paypal\Model\Pro::class => null, + Magento\Paypal\Model\Api\Nvp::class => null, + Magento\Sales\Model\ResourceModel\Order\Invoice\Collection\Interceptor::class => null, + Magento\CatalogSearch\Model\ResourceModel\EngineProvider::class => null, + Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory::class => null, + Magento\Indexer\Model\Mview\View\State\Interceptor::class => null, + Magento\Framework\Mview\View::class => null, + Magento\Framework\Validator\EmailAddress::class => null, + Magento\Framework\Amqp\ConfigPool::class => null, + Magento\Framework\Amqp\ExchangeFactory::class => null, + Magento\Framework\MessageQueue\MessageEncoder::class => null, + Magento\Framework\MessageQueue\MessageValidator::class => null, + Magento\Framework\MessageQueue\Bulk\Publisher::class => null, + Magento\Framework\MessageQueue\Bulk\Rpc\Publisher::class => null, + Magento\InventorySales\Plugin\InventoryReservationsApi\PreventAppendReservationOnNotManageItemsInStockPlugin::class => null, + Magento\Framework\MessageQueue\ExchangeRepository::class => null, + Magento\Framework\MessageQueue\Publisher::class => null, + Magento\Framework\MessageQueue\Rpc\Publisher::class => null, + Magento\Framework\MessageQueue\PublisherPool::class => null, + Magento\InventoryIndexer\Plugin\InventorySales\EnqueueAfterPlaceReservationsForSalesEvent::class => null, + Magento\Framework\Amqp\Config::class => null, + Magento\Framework\Amqp\Exchange::class => null, + PhpAmqpLib\Connection\AMQPStreamConnection::class => null, + Magento\CatalogInventory\Model\Indexer\Stock\CacheCleaner::class => null, + Magento\InventoryCatalogSearch\Plugin\CatalogSearch\Model\Indexer\ChildProductFilterByInventoryStockPlugin::class => null, + Magento\InventoryElasticsearch\Plugin\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider\StockedProductFilterByInventoryStock::class => null, + Magento\Widget\Model\ResourceModel\Layout\Update::class => null, + Magento\Widget\Model\ResourceModel\Layout\Plugin::class => null, + Magento\Sales\Model\Order\Address\Interceptor::class => null, + Magento\OfflinePayments\Model\Checkmo\Interceptor::class => null, + Magento\CustomerCustomAttributes\Model\ResourceModel\Sales\Order::class => null, + Magento\CustomerCustomAttributes\Model\ResourceModel\Sales\Order\Address::class => null, + Magento\CatalogPermissions\Model\Indexer\TableMaintainer::class => null, + Magento\NegotiableQuote\Model\Restriction\Admin::class => null, + Magento\AsynchronousOperations\Model\BulkManagement::class => null, + Magento\SalesRule\Model\Service\CouponUsagePublisher::class => null, + Magento\Paypal\Model\Api\Nvp\Interceptor::class => null, + Magento\PurchaseOrder\Model\PurchaseOrder\LogManagement::class => null, + Magento\Quote\Model\ResourceModel\Collection\Interceptor::class => null, + Magento\Customer\Model\Metadata\AddressMetadata::class => null, + Magento\Customer\Model\Metadata\AddressCachedMetadata::class => null, + Magento\Reward\Model\Reward::class => null, + Magento\Reward\Model\Reward\Rate::class => null, + Magento\Framework\App\ResourceConnection\Config::class => null, + Magento\Framework\DB\Logger\LoggerProxy::class => null, + Magento\Framework\DB\Select\RendererProxy::class => null, + Magento\Framework\DB\SelectFactory::class => null, + Magento\Quote\Api\Data\CartItemExtension::class => null, + Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList::class => null, + Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option\Interceptor::class => null, + Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\StockItem::class => null, + Magento\SalesRule\Model\Coupon\CodeLimitManager::class => null, + Magento\SalesRule\Observer\CouponCodeValidation::class => null, + Magento\OfflineShipping\Model\Carrier\Flatrate::class => null, + Magento\Quote\Model\Quote\Payment::class => null, + Magento\Sales\Model\Order\Email\Container\Template::class => null, + Magento\Sales\Model\Order\Email\Container\OrderIdentity::class => null, + Magento\Customer\Model\Address\Config::class => null, + Magento\Sales\Model\Order\Address\Renderer::class => null, + Magento\Sales\Model\Order\Email\Sender\OrderCommentSender::class => null, + Magento\Sales\Model\Order\Email\Sender\InvoiceCommentSender::class => null, + Magento\Sales\Model\Order\Email\Sender\InvoiceSender::class => null, + Magento\Sales\Model\Order\Email\Sender\CreditmemoCommentSender::class => null, + Magento\Sales\Model\Order\Email\Sender\CreditmemoSender::class => null, + Magento\Sales\Model\Order\Status::class => null, + Magento\CatalogInventory\Model\Indexer\Stock\Action\Rows::class => null, + Magento\CatalogInventory\Model\ResourceModel\Indexer\Stock\DefaultStock::class => null, + Magento\ConfigurableProduct\Model\ResourceModel\Indexer\Stock\Configurable::class => null, + Magento\Bundle\Model\ResourceModel\Indexer\Stock::class => null, + Magento\GroupedProduct\Model\ResourceModel\Indexer\Stock\Grouped::class => null, + Magento\Elasticsearch\Model\Adapter\BatchDataMapper\DataMapperResolver::class => null, + Magento\Elasticsearch\Model\Adapter\Elasticsearch::class => null, + Magento\Tax\Model\TaxClass\Source\Product::class => null, + Magento\Framework\View\TemplateEnginePool::class => null, + Magento\Framework\View\Element\Template\File\Resolver::class => null, + Magento\Framework\View\Element\Template\File\Validator::class => null, + Magento\Framework\View\Element\Template\Context::class => null, + 'validator' => null, + 'inlineTranslation' => null, + Magento\Customer\Block\Address\Renderer\DefaultRenderer::class => null, + Magento\Framework\View\Layout\ReaderPool::class => null, + Magento\Framework\View\Layout\Reader\Block::class => null, + Magento\Framework\View\Layout\Reader\UiComponent::class => null, + Magento\PageCache\Observer\ProcessLayoutRenderElement::class => null, + Magento\Staging\Model\Update::class => null, + Magento\Staging\Model\Update\Flag::class => null, + Magento\Catalog\Model\Category\Attribute\Source\Sortby::class => null, ], '' => [ ],