You are here

function CommerceBraintreeTest::setUp in Commerce Braintree 7.2

Same name and namespace in other branches
  1. 7.3 tests/commerce_braintree.test \CommerceBraintreeTest::setUp()
  2. 7 tests/commerce_braintree.test \CommerceBraintreeTest::setUp()

Implementation of setUp().

Overrides DrupalWebTestCase::setUp

File

tests/commerce_braintree.test, line 49
Functional tests for the commerce payment module user interface.

Class

CommerceBraintreeTest
Test payment user interface.

Code

function setUp() {
  $modules = parent::setUpHelper('all');
  $modules[] = 'commerce_braintree';
  parent::setUp($modules);

  // User creation for different operations.
  $this->store_admin = $this
    ->createStoreAdmin();
  $this->web_user = $this
    ->drupalCreateUser(array(
    'manage own card data',
  ));

  // The rule that sends a mail after checkout completion should be disabled
  // as it returns an error caused by how mail messages are stored.
  $rules_config = rules_config_load('commerce_checkout_order_email');
  $rules_config->active = FALSE;
  $rules_config
    ->save();

  // Setup a default user name.
  $this
    ->setRandomName($this
    ->randomName());
}