66 */
77namespace Magento \Quote \Api ;
88
9- use Magento \Catalog \Model \Indexer \Product \Category \Processor ;
109use Magento \Catalog \Test \Fixture \Product as ProductFixture ;
1110use Magento \Checkout \Test \Fixture \SetBillingAddress as SetBillingAddressFixture ;
1211use Magento \Checkout \Test \Fixture \SetDeliveryMethod as SetDeliveryMethodFixture ;
2726use Magento \TestFramework \TestCase \WebapiAbstract ;
2827use Magento \Quote \Model \Quote ;
2928use Magento \Quote \Model \Quote \Address ;
29+ use Magento \TestModuleOverrideConfig \Inheritance \Fixtures \FixturesInterface ;
3030
3131class CartTotalRepositoryTest extends WebapiAbstract
3232{
@@ -35,11 +35,6 @@ class CartTotalRepositoryTest extends WebapiAbstract
3535 */
3636 private $ objectManager ;
3737
38- /**
39- * @var Processor
40- */
41- private $ indexer ;
42-
4338 /**
4439 * @var SearchCriteriaBuilder
4540 */
@@ -50,6 +45,11 @@ class CartTotalRepositoryTest extends WebapiAbstract
5045 */
5146 private $ filterBuilder ;
5247
48+ /**
49+ * @var FixturesInterface
50+ */
51+ private $ fixtures ;
52+
5353 protected function setUp (): void
5454 {
5555 $ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
@@ -99,15 +99,64 @@ public function testGetTotals()
9999 * @magentoConfigFixture default_store shipping/origin/postcode 10011
100100 */
101101 #[
102- DataFixture(TaxRule::class, ['tax_rate_ids ' => [2 ], 'product_tax_class_ids ' => [2 ], 'customer_tax_class_ids ' => [3 ], 'code ' => 'TaxRule1 ' ], 'tax_rule ' ),
103- DataFixture(ProductFixture::class, ['price ' =>5 ], 'product ' ),
104- DataFixture(GuestCartFixture::class, as: 'cart ' ),
105- DataFixture(AddProductToCartFixture::class, ['cart_id ' => '$cart.id$ ' , 'product_id ' => '$product.id$ ' ]),
106- DataFixture(SetBillingAddressFixture::class, ['cart_id ' => '$cart.id$ ' , 'address ' => [AddressInterface::KEY_POSTCODE => 10036 , AddressInterface::KEY_CITY => 'New York ' , AddressInterface::KEY_REGION_ID => 43 ] ]),
107- DataFixture(SetShippingAddressFixture::class, ['cart_id ' => '$cart.id$ ' , 'address ' => [AddressInterface::KEY_POSTCODE => 10036 , AddressInterface::KEY_CITY => 'New York ' , AddressInterface::KEY_REGION_ID => 43 ] ]),
108- DataFixture(SetGuestEmailFixture::class, ['cart_id ' => '$cart.id$ ' ]),
109- DataFixture(SetDeliveryMethodFixture::class, ['cart_id ' => '$cart.id$ ' ]),
110- DataFixture(SetPaymentMethodFixture::class, ['cart_id ' => '$cart.id$ ' ]),
102+ DataFixture(
103+ TaxRule::class, [
104+ 'tax_rate_ids ' => [2 ],
105+ 'product_tax_class_ids ' => [2 ],
106+ 'customer_tax_class_ids ' => [3 ]
107+ ],
108+ 'tax_rule '
109+ ),
110+ DataFixture(
111+ ProductFixture::class, [
112+ 'price ' =>5
113+ ],
114+ 'product '
115+ ),
116+ DataFixture(
117+ GuestCartFixture::class, as: 'cart '
118+ ),
119+ DataFixture(
120+ AddProductToCartFixture::class, [
121+ 'cart_id ' => '$cart.id$ ' ,
122+ 'product_id ' => '$product.id$ '
123+ ]
124+ ),
125+ DataFixture(
126+ SetBillingAddressFixture::class, [
127+ 'cart_id ' => '$cart.id$ ' ,
128+ 'address ' => [
129+ AddressInterface::KEY_POSTCODE => 10036 ,
130+ AddressInterface::KEY_CITY => 'New York ' ,
131+ AddressInterface::KEY_REGION_ID => 43
132+ ]
133+ ]
134+ ),
135+ DataFixture(
136+ SetShippingAddressFixture::class, [
137+ 'cart_id ' => '$cart.id$ ' ,
138+ 'address ' => [
139+ AddressInterface::KEY_POSTCODE => 10036 ,
140+ AddressInterface::KEY_CITY => 'New York ' ,
141+ AddressInterface::KEY_REGION_ID => 43
142+ ]
143+ ]
144+ ),
145+ DataFixture(
146+ SetGuestEmailFixture::class, [
147+ 'cart_id ' => '$cart.id$ '
148+ ]
149+ ),
150+ DataFixture(
151+ SetDeliveryMethodFixture::class, [
152+ 'cart_id ' => '$cart.id$ '
153+ ]
154+ ),
155+ DataFixture(
156+ SetPaymentMethodFixture::class, [
157+ 'cart_id ' => '$cart.id$ '
158+ ]
159+ ),
111160 ]
112161 public function testGetGrandTotalsWithIncludedTaxAndSameCurrency ()
113162 {
0 commit comments