Skip to content

Commit d757fb5

Browse files
committed
Update tests to use @magentoConfigFixture
Deletes configuration data fixtures no longer in use
1 parent ec719be commit d757fb5

File tree

5 files changed

+57
-83
lines changed

5 files changed

+57
-83
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/CreateBraintreeClientTokenTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ class CreateBraintreeClientTokenTest extends GraphQlAbstract
1717
/**
1818
* Test creating Braintree client token
1919
*
20-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
20+
* @magentoConfigFixture default_store payment/braintree/active 1
21+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
22+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
23+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
24+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
2125
*/
2226
public function testCreateBraintreeClientToken()
2327
{

dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,19 @@ protected function setUp()
8080
}
8181

8282
/**
83+
* @magentoConfigFixture default_store carriers/flatrate/active 1
84+
* @magentoConfigFixture default_store payment/braintree/active 1
85+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
86+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
87+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
88+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
8389
* @magentoApiDataFixture Magento/Customer/_files/customer.php
8490
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
85-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
8691
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
8792
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
8893
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
8994
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
9095
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
91-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
9296
*/
9397
public function testPlaceOrder()
9498
{
@@ -113,15 +117,20 @@ public function testPlaceOrder()
113117
}
114118

115119
/**
120+
* @magentoConfigFixture default_store carriers/flatrate/active 1
121+
* @magentoConfigFixture default_store payment/braintree/active 1
122+
* @magentoConfigFixture default_store payment/braintree_cc_vault/active 1
123+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
124+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
125+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
126+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
116127
* @magentoApiDataFixture Magento/Customer/_files/customer.php
117128
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
118-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
119129
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
120130
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
121131
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
122132
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
123133
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
124-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
125134
*/
126135
public function testPlaceOrderSaveInVault()
127136
{
@@ -153,15 +162,20 @@ public function testPlaceOrderSaveInVault()
153162
}
154163

155164
/**
165+
* @magentoConfigFixture default_store carriers/flatrate/active 1
166+
* @magentoConfigFixture default_store payment/braintree/active 1
167+
* @magentoConfigFixture default_store payment/braintree_cc_vault/active 1
168+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
169+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
170+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
171+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
156172
* @magentoApiDataFixture Magento/Customer/_files/customer.php
157173
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
158-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
159174
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
160175
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
161176
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
162177
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
163178
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
164-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
165179
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/token.php
166180
*/
167181
public function testPlaceOrderWithVault()
@@ -184,15 +198,20 @@ public function testPlaceOrderWithVault()
184198
}
185199

186200
/**
201+
* @magentoConfigFixture default_store carriers/flatrate/active 1
202+
* @magentoConfigFixture default_store payment/braintree/active 1
203+
* @magentoConfigFixture default_store payment/braintree_cc_vault/active 1
204+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
205+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
206+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
207+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
187208
* @magentoApiDataFixture Magento/Customer/_files/customer.php
188209
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
189-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
190210
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
191211
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
192212
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
193213
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
194214
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
195-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
196215
* @dataProvider dataProviderTestSetPaymentMethodInvalidInput
197216
* @expectedException \Exception
198217
* @param string $methodCode
@@ -211,15 +230,20 @@ public function testSetPaymentMethodInvalidInput(string $methodCode)
211230
}
212231

213232
/**
233+
* @magentoConfigFixture default_store carriers/flatrate/active 1
234+
* @magentoConfigFixture default_store payment/braintree/active 1
235+
* @magentoConfigFixture default_store payment/braintree_cc_vault/active 1
236+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
237+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
238+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
239+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
214240
* @magentoApiDataFixture Magento/Customer/_files/customer.php
215241
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
216-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
217242
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
218243
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
219244
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
220245
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
221246
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
222-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
223247
* @dataProvider dataProviderTestSetPaymentMethodInvalidInput
224248
* @expectedException \Exception
225249
* @param string $methodCode

dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Guest/SetPaymentMethodTest.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,19 @@ protected function setUp()
5959
}
6060

6161
/**
62+
* @magentoConfigFixture default_store carriers/flatrate/active 1
63+
* @magentoConfigFixture default_store payment/braintree/active 1
64+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
65+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
66+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
67+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
6268
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
63-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
6469
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php
6570
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php
6671
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
6772
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
6873
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
6974
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
70-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
7175
* @dataProvider dataProviderTestPlaceOrder
7276
*/
7377
public function testPlaceOrder(string $nonce)
@@ -100,15 +104,19 @@ public function dataProviderTestPlaceOrder(): array
100104
}
101105

102106
/**
107+
* @magentoConfigFixture default_store carriers/flatrate/active 1
108+
* @magentoConfigFixture default_store payment/braintree/active 1
109+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
110+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
111+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
112+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
103113
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
104-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
105114
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php
106115
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php
107116
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
108117
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
109118
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
110119
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
111-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
112120
* @expectedException \Exception
113121
*/
114122
public function testSetPaymentMethodInvalidInput()
@@ -122,15 +130,19 @@ public function testSetPaymentMethodInvalidInput()
122130
}
123131

124132
/**
133+
* @magentoConfigFixture default_store carriers/flatrate/active 1
134+
* @magentoConfigFixture default_store payment/braintree/active 1
135+
* @magentoConfigFixture default_store payment/braintree/environment sandbox
136+
* @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id
137+
* @magentoConfigFixture default_store payment/braintree/public_key def_public_key
138+
* @magentoConfigFixture default_store payment/braintree/private_key def_private_key
125139
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
126-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php
127140
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php
128141
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php
129142
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
130143
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
131144
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
132145
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
133-
* @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php
134146
* @expectedException \Exception
135147
*/
136148
public function testSetPaymentMethodInvalidMethodInput()

dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment_rollback.php

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)