diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php index 420e1b80d74c..b5042dc27fe2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php @@ -80,15 +80,19 @@ protected function setUp() } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php - * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php */ public function testPlaceOrder() { @@ -113,15 +117,20 @@ public function testPlaceOrder() } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree_cc_vault/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php - * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php */ public function testPlaceOrderSaveInVault() { @@ -153,15 +162,20 @@ public function testPlaceOrderSaveInVault() } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree_cc_vault/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php - * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/token.php */ public function testPlaceOrderWithVault() @@ -184,15 +198,20 @@ public function testPlaceOrderWithVault() } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree_cc_vault/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php - * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php * @dataProvider dataProviderTestSetPaymentMethodInvalidInput * @expectedException \Exception * @param string $methodCode @@ -211,15 +230,20 @@ public function testSetPaymentMethodInvalidInput(string $methodCode) } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree_cc_vault/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php - * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php * @dataProvider dataProviderTestSetPaymentMethodInvalidInput * @expectedException \Exception * @param string $methodCode diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Guest/SetPaymentMethodTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Guest/SetPaymentMethodTest.php index 832b5e130b0f..a27c7d027812 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Guest/SetPaymentMethodTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Guest/SetPaymentMethodTest.php @@ -59,15 +59,19 @@ protected function setUp() } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php - * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php * @dataProvider dataProviderTestPlaceOrder */ public function testPlaceOrder(string $nonce) @@ -100,15 +104,19 @@ public function dataProviderTestPlaceOrder(): array } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php - * @magentoApiDataFixture Magento/GraphQl/Braintree/_files/enable_braintree_payment.php * @expectedException \Exception */ public function testSetPaymentMethodInvalidInput() @@ -122,6 +130,12 @@ public function testSetPaymentMethodInvalidInput() } /** + * @magentoConfigFixture carriers/flatrate/active 1 + * @magentoConfigFixture payment/braintree/active 1 + * @magentoConfigFixture payment/braintree/environment sandbox + * @magentoConfigFixture payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture payment/braintree/public_key def_public_key + * @magentoConfigFixture payment/braintree/private_key def_private_key * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/enable_offline_shipping_methods.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment.php b/dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment.php deleted file mode 100644 index b91259376bed..000000000000 --- a/dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment.php +++ /dev/null @@ -1,35 +0,0 @@ -get(WriterInterface::class); -/** @var EncryptorInterface $encryptor */ -$encryptor = $objectManager->get(EncryptorInterface::class); - -/** @var $mutableScopeConfig */ -$mutableScopeConfig = $objectManager->get( - \Magento\Framework\App\Config\MutableScopeConfigInterface::class -); - -$configWriter->save('payment/' . ConfigProvider::CODE . '/merchant_id', 'def_merchant_id'); -$configWriter->save('payment/' . ConfigProvider::CODE . '/public_key', $encryptor->encrypt('def_public_key')); -$configWriter->save('payment/' . ConfigProvider::CODE . '/private_key', $encryptor->encrypt('def_private_key')); -$configWriter->save('payment/' . ConfigProvider::CODE . '/active', '1'); -$configWriter->save('payment/' . ConfigProvider::CODE . '/environment', 'sandbox'); -$configWriter->save('payment/' . ConfigProvider::CC_VAULT_CODE . '/active', '1'); - -$scopeConfig = $objectManager->get(ScopeConfigInterface::class); -$scopeConfig->clean(); diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment_rollback.php b/dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment_rollback.php deleted file mode 100644 index 7b4e187c6717..000000000000 --- a/dev/tests/integration/testsuite/Magento/GraphQl/Braintree/_files/enable_braintree_payment_rollback.php +++ /dev/null @@ -1,31 +0,0 @@ -get(WriterInterface::class); -/** @var EncryptorInterface $encryptor */ -$encryptor = $objectManager->get(EncryptorInterface::class); - -/** @var $mutableScopeConfig */ -$mutableScopeConfig = $objectManager->get( - \Magento\Framework\App\Config\MutableScopeConfigInterface::class -); - -$configWriter->delete('payment/' . ConfigProvider::CODE . '/merchant_id'); -$configWriter->delete('payment/' . ConfigProvider::CODE . '/public_key'); -$configWriter->delete('payment/' . ConfigProvider::CODE . '/private_key'); -$configWriter->delete('payment/' . ConfigProvider::CODE . '/active'); -$configWriter->delete('payment/' . ConfigProvider::CODE . '/environment'); -$configWriter->delete('payment/' . ConfigProvider::CC_VAULT_CODE . '/active');