You are here

protected function MailchimpEcommerceCommerceTestCase::setUp in Mailchimp E-Commerce 7

Pre-test setup function.

Enables dependencies. Sets the mailchimp_api_key to the test-mode key. Sets test mode to TRUE.

Overrides DrupalWebTestCase::setUp

File

modules/mailchimp_ecommerce_commerce/tests/mailchimp_ecommerce_commerce.test, line 34
Test class and methods for the Mailchimp eCommerce Commerce module.

Class

MailchimpEcommerceCommerceTestCase
Tests for Mailchimp eCommerce integration with Drupal Commerce.

Code

protected function setUp() {
  $this->profile = drupal_get_profile();

  // Enable modules required for the test.
  $enabled_modules = [
    'commerce',
    'commerce_product_ui',
    'entity',
    'libraries',
    'mailchimp',
    'mailchimp_activity',
    'mailchimp_campaign',
    'mailchimp_ecommerce',
    'mailchimp_ecommerce_commerce',
    'mailchimp_signup',
  ];
  parent::setUp($enabled_modules);
  variable_set('mailchimp_api_key', 'MAILCHIMP_TEST_API_KEY');
  variable_set('mailchimp_test_mode', TRUE);
}