@@ -28,6 +28,13 @@ class AddVirtualProductToCartTest extends GraphQlAbstract
28
28
*/
29
29
private $ getMaskedQuoteIdByReservedOrderId ;
30
30
31
+ protected function setUp ()
32
+ {
33
+ $ objectManager = Bootstrap::getObjectManager ();
34
+ $ this ->customerTokenService = $ objectManager ->get (CustomerTokenServiceInterface::class);
35
+ $ this ->getMaskedQuoteIdByReservedOrderId = $ objectManager ->get (GetMaskedQuoteIdByReservedOrderId::class);
36
+ }
37
+
31
38
/**
32
39
* @magentoApiDataFixture Magento/Customer/_files/customer.php
33
40
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/virtual_product.php
@@ -83,6 +90,7 @@ public function testNonExistentProductToCart()
83
90
}
84
91
85
92
/**
93
+ * _security
86
94
* @magentoApiDataFixture Magento/Customer/_files/customer.php
87
95
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/virtual_product.php
88
96
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php
@@ -102,9 +110,10 @@ public function testAddVirtualProductToGuestCart()
102
110
}
103
111
104
112
/**
113
+ * _security
105
114
* @magentoApiDataFixture Magento/Customer/_files/three_customers.php
106
115
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/virtual_product.php
107
- * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest /create_empty_cart.php
116
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer /create_empty_cart.php
108
117
*/
109
118
public function testAddVirtualProductToAnotherCustomerCart ()
110
119
{
@@ -120,15 +129,10 @@ public function testAddVirtualProductToAnotherCustomerCart()
120
129
$ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ('customer2@search.example.com ' ));
121
130
}
122
131
123
- protected function setUp ()
124
- {
125
- $ objectManager = Bootstrap::getObjectManager ();
126
- $ this ->customerTokenService = $ objectManager ->get (CustomerTokenServiceInterface::class);
127
- $ this ->getMaskedQuoteIdByReservedOrderId = $ objectManager ->get (GetMaskedQuoteIdByReservedOrderId::class);
128
- }
129
-
130
132
/**
131
133
* @param string $maskedQuoteId
134
+ * @param string $sku
135
+ * @param int $qty
132
136
* @return string
133
137
*/
134
138
private function getQuery (string $ maskedQuoteId , string $ sku , int $ qty ): string
@@ -140,8 +144,8 @@ private function getQuery(string $maskedQuoteId, string $sku, int $qty): string
140
144
cartItems: [
141
145
{
142
146
data: {
143
- qty: $ qty
144
- sku: " $ sku"
147
+ qty: { $ qty}
148
+ sku: " { $ sku} "
145
149
}
146
150
}
147
151
]
0 commit comments