@@ -52,6 +52,22 @@ public function testAddSimpleProductToCart()
52
52
self ::assertArrayHasKey ('cart ' , $ response ['addSimpleProductsToCart ' ]);
53
53
self ::assertEquals ($ quantity , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['quantity ' ]);
54
54
self ::assertEquals ($ sku , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['product ' ]['sku ' ]);
55
+ self ::assertArrayHasKey ('prices ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]);
56
+
57
+ self ::assertArrayHasKey ('price ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]);
58
+ self ::assertArrayHasKey ('value ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['price ' ]);
59
+ self ::assertEquals (10 , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['price ' ]['value ' ]);
60
+ self ::assertEquals ('USD ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['price ' ]['currency ' ]);
61
+
62
+ self ::assertArrayHasKey ('row_total ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]);
63
+ self ::assertArrayHasKey ('value ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['row_total ' ]);
64
+ self ::assertEquals (20 , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['row_total ' ]['value ' ]);
65
+ self ::assertEquals ('USD ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['row_total ' ]['currency ' ]);
66
+
67
+ self ::assertArrayHasKey ('row_total_including_tax ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]);
68
+ self ::assertArrayHasKey ('value ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['row_total_including_tax ' ]);
69
+ self ::assertEquals (20 , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['row_total_including_tax ' ]['value ' ]);
70
+ self ::assertEquals ('USD ' , $ response ['addSimpleProductsToCart ' ]['cart ' ]['items ' ][0 ]['prices ' ]['row_total_including_tax ' ]['currency ' ]);
55
71
}
56
72
57
73
/**
@@ -262,6 +278,20 @@ private function getQuery(string $maskedQuoteId, string $sku, float $quantity):
262
278
product {
263
279
sku
264
280
}
281
+ prices {
282
+ price {
283
+ value
284
+ currency
285
+ }
286
+ row_total {
287
+ value
288
+ currency
289
+ }
290
+ row_total_including_tax {
291
+ value
292
+ currency
293
+ }
294
+ }
265
295
}
266
296
}
267
297
}
0 commit comments