private function CommerceBraintreeCofTest::setBraintreeCredential in Commerce Braintree 7
Same name and namespace in other branches
- 7.3 tests/commerce_braintree_cof.test \CommerceBraintreeCofTest::setBraintreeCredential()
- 7.2 tests/commerce_braintree_cof.test \CommerceBraintreeCofTest::setBraintreeCredential()
Fill the payment settings form with testing values.
1 call to CommerceBraintreeCofTest::setBraintreeCredential()
- CommerceBraintreeCofTest::testCommerceBraintreeCofRequest in tests/
commerce_braintree_cof.test - Test a card on File request. Be sure we store the credit card.
File
- tests/
commerce_braintree_cof.test, line 202 - Functional tests for the commerce payment module user interface.
Class
- CommerceBraintreeCofTest
- Test payment user interface.
Code
private function setBraintreeCredential() {
// Create an admin user, log in and enable test blocks.
$this->admin_user = $this
->drupalCreateUser(array(
'administer site configuration',
'bypass rules access',
'bypass node access',
'administer nodes',
'administer payment methods',
));
$this
->drupalLogin($this->admin_user);
$this
->drupalGet('admin/commerce/config/payment-methods/manage/commerce_payment_braintree_cof');
$this
->clickLink('edit');
$info = array(
'parameter[payment_method][settings][payment_method][settings][commerce_braintree_mode]' => 'sandbox',
'parameter[payment_method][settings][payment_method][settings][commerce_braintree_merchant_id]' => 'y37hv7xmv9tqspcz',
'parameter[payment_method][settings][payment_method][settings][commerce_braintree_public_key]' => '25sz2yrhy4nr8vj7',
'parameter[payment_method][settings][payment_method][settings][commerce_braintree_private_key]' => '90907493a55d78ffdccaf415a3226f25',
);
$this
->drupalPost(NULL, $info, t('Save'));
}