-
Notifications
You must be signed in to change notification settings - Fork 154
420 test coverage get available payment methods guest #450
420 test coverage get available payment methods guest #450
Conversation
1. Add - testGetPaymentMethodsFromGuestCart() - testGetPaymentMethodsFromAnotherCustomerCart() - testGetPaymentMethodsIfPaymentsAreNotSet() - testGetPaymentMethodsOfNonExistentCart() to \Magento\GraphQl\Quote\\Guest\GetAvailablePaymentMethodsTest
1. Add Magento/Payment/_files/disable_all_active_payment_methods.php
1. Fix typo errors
$processConfigData = function (Config $config, array $data) { | ||
foreach ($data as $key => $value) { | ||
$config->setDataByPath($key, $value); | ||
$config->save(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we don't need to call save after each iteration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we don't need to call save after each iteration
@naydav , I've debugged your suggestions and I want inform you that we should use $config->save();
after each $config->setDataByPath($key, $value);
if we want to save all config params.
By the way, the same approach uses in:
- dev/tests/integration/testsuite/Magento/Braintree/_files/payment_configuration.php
- dev/tests/integration/testsuite/Magento/Paypal/Fixtures/process_config_data.php
- dev/tests/integration/testsuite/Magento/SendFriend/Fixtures/process_config_data.php
- dev/tests/integration/testsuite/Magento/Signifyd/_files/website_configuration.php
Please approve and merge ;)
Thank you!
Merge remote-tracking branch 'origin/2.3-develop' into 420-test-coverage-getAvailablePaymentMethods-guest # Conflicts: # dev/tests/integration/testsuite/Magento/Payment/_files/disable_all_active_payment_methods.php # dev/tests/integration/testsuite/Magento/Payment/_files/disable_all_active_payment_methods_rollback.php
Hi @atwixfirster, thank you for your contribution! |
Test coverage: GetAvailablePaymentMethodsTest for Guest #420
Pull request covers next cases:
Issue: #420