22
22
use Magento \Tax \Test \Fixture \TaxRule as TaxRule ;
23
23
use Magento \TestFramework \Fixture \DataFixture ;
24
24
use Magento \TestFramework \Fixture \DataFixtureStorageManager ;
25
+ use Magento \TestFramework \Fixture \Config ;
25
26
use Magento \TestFramework \ObjectManager ;
26
27
use Magento \TestFramework \TestCase \WebapiAbstract ;
27
28
use Magento \Quote \Model \Quote ;
@@ -60,6 +61,10 @@ protected function setUp(): void
60
61
\Magento \Framework \Api \FilterBuilder::class
61
62
);
62
63
$ this ->fixtures = $ this ->objectManager ->get (DataFixtureStorageManager::class)->getStorage ();
64
+ $ this ->_object = $ this ->createPartialMock (
65
+ Config::class,
66
+ ['_getConfigValue ' , '_setConfigValue ' ]
67
+ );
63
68
}
64
69
65
70
/**
@@ -92,38 +97,40 @@ public function testGetTotals()
92
97
$ this ->assertEquals ($ data , $ actual );
93
98
}
94
99
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
- */
101
100
#[
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 ' ),
102
105
DataFixture(
103
- TaxRule::class, [
106
+ TaxRule::class,
107
+ [
104
108
'tax_rate_ids ' => [2 ],
105
109
'product_tax_class_ids ' => [2 ],
106
110
'customer_tax_class_ids ' => [3 ]
107
111
],
108
112
'tax_rule '
109
113
),
110
114
DataFixture(
111
- ProductFixture::class, [
112
- 'price ' =>5
115
+ ProductFixture::class,
116
+ [
117
+ 'price ' => 5
113
118
],
114
119
'product '
115
120
),
116
121
DataFixture(
117
122
GuestCartFixture::class, as: 'cart '
118
123
),
119
124
DataFixture(
120
- AddProductToCartFixture::class, [
125
+ AddProductToCartFixture::class,
126
+ [
121
127
'cart_id ' => '$cart.id$ ' ,
122
128
'product_id ' => '$product.id$ '
123
129
]
124
130
),
125
131
DataFixture(
126
- SetBillingAddressFixture::class, [
132
+ SetBillingAddressFixture::class,
133
+ [
127
134
'cart_id ' => '$cart.id$ ' ,
128
135
'address ' => [
129
136
AddressInterface::KEY_POSTCODE => 10036 ,
@@ -133,7 +140,8 @@ public function testGetTotals()
133
140
]
134
141
),
135
142
DataFixture(
136
- SetShippingAddressFixture::class, [
143
+ SetShippingAddressFixture::class,
144
+ [
137
145
'cart_id ' => '$cart.id$ ' ,
138
146
'address ' => [
139
147
AddressInterface::KEY_POSTCODE => 10036 ,
@@ -143,17 +151,20 @@ public function testGetTotals()
143
151
]
144
152
),
145
153
DataFixture(
146
- SetGuestEmailFixture::class, [
154
+ SetGuestEmailFixture::class,
155
+ [
147
156
'cart_id ' => '$cart.id$ '
148
157
]
149
158
),
150
159
DataFixture(
151
- SetDeliveryMethodFixture::class, [
160
+ SetDeliveryMethodFixture::class,
161
+ [
152
162
'cart_id ' => '$cart.id$ '
153
163
]
154
164
),
155
165
DataFixture(
156
- SetPaymentMethodFixture::class, [
166
+ SetPaymentMethodFixture::class,
167
+ [
157
168
'cart_id ' => '$cart.id$ '
158
169
]
159
170
),
0 commit comments