2222use Magento \Tax \Test \Fixture \TaxRule as TaxRule ;
2323use Magento \TestFramework \Fixture \DataFixture ;
2424use Magento \TestFramework \Fixture \DataFixtureStorageManager ;
25+ use Magento \TestFramework \Fixture \Config ;
2526use Magento \TestFramework \ObjectManager ;
2627use Magento \TestFramework \TestCase \WebapiAbstract ;
2728use Magento \Quote \Model \Quote ;
@@ -60,6 +61,10 @@ protected function setUp(): void
6061 \Magento \Framework \Api \FilterBuilder::class
6162 );
6263 $ this ->fixtures = $ this ->objectManager ->get (DataFixtureStorageManager::class)->getStorage ();
64+ $ this ->_object = $ this ->createPartialMock (
65+ Config::class,
66+ ['_getConfigValue ' , '_setConfigValue ' ]
67+ );
6368 }
6469
6570 /**
@@ -92,38 +97,40 @@ public function testGetTotals()
9297 $ this ->assertEquals ($ data , $ actual );
9398 }
9499
95- /**
96- * @magentoConfigFixture default_store tax/defaults/region 43
97- * @magentoConfigFixture default_store tax/defaults/postcode 10036
98- * @magentoConfigFixture default_store shipping/origin/region_id 43
99- * @magentoConfigFixture default_store shipping/origin/postcode 10011
100- */
101100 #[
101+ Config('tax/defaults/region_id ' , '43 ' ),
102+ Config('tax/defaults/postcode ' , '10036 ' ),
103+ Config('shipping/origin/region_id ' , '43 ' ),
104+ Config('tax/defaults/postcode ' , '10011 ' ),
102105 DataFixture(
103- TaxRule::class, [
106+ TaxRule::class,
107+ [
104108 'tax_rate_ids ' => [2 ],
105109 'product_tax_class_ids ' => [2 ],
106110 'customer_tax_class_ids ' => [3 ]
107111 ],
108112 'tax_rule '
109113 ),
110114 DataFixture(
111- ProductFixture::class, [
112- 'price ' =>5
115+ ProductFixture::class,
116+ [
117+ 'price ' => 5
113118 ],
114119 'product '
115120 ),
116121 DataFixture(
117122 GuestCartFixture::class, as: 'cart '
118123 ),
119124 DataFixture(
120- AddProductToCartFixture::class, [
125+ AddProductToCartFixture::class,
126+ [
121127 'cart_id ' => '$cart.id$ ' ,
122128 'product_id ' => '$product.id$ '
123129 ]
124130 ),
125131 DataFixture(
126- SetBillingAddressFixture::class, [
132+ SetBillingAddressFixture::class,
133+ [
127134 'cart_id ' => '$cart.id$ ' ,
128135 'address ' => [
129136 AddressInterface::KEY_POSTCODE => 10036 ,
@@ -133,7 +140,8 @@ public function testGetTotals()
133140 ]
134141 ),
135142 DataFixture(
136- SetShippingAddressFixture::class, [
143+ SetShippingAddressFixture::class,
144+ [
137145 'cart_id ' => '$cart.id$ ' ,
138146 'address ' => [
139147 AddressInterface::KEY_POSTCODE => 10036 ,
@@ -143,17 +151,20 @@ public function testGetTotals()
143151 ]
144152 ),
145153 DataFixture(
146- SetGuestEmailFixture::class, [
154+ SetGuestEmailFixture::class,
155+ [
147156 'cart_id ' => '$cart.id$ '
148157 ]
149158 ),
150159 DataFixture(
151- SetDeliveryMethodFixture::class, [
160+ SetDeliveryMethodFixture::class,
161+ [
152162 'cart_id ' => '$cart.id$ '
153163 ]
154164 ),
155165 DataFixture(
156- SetPaymentMethodFixture::class, [
166+ SetPaymentMethodFixture::class,
167+ [
157168 'cart_id ' => '$cart.id$ '
158169 ]
159170 ),
0 commit comments