protected function MailchimpEcommerceTestCase::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
- tests/
mailchimp_ecommerce.test, line 34 - Test class and methods for the Mailchimp eCommerce module.
Class
- MailchimpEcommerceTestCase
- Tests for Mailchimp eCommerce core integration.
Code
protected function setUp() {
$this->profile = drupal_get_profile();
// Enable modules required for the test.
$enabled_modules = [
'commerce',
'entity',
'libraries',
'mailchimp',
'mailchimp_ecommerce',
];
parent::setUp($enabled_modules);
variable_set('mailchimp_api_key', 'MAILCHIMP_TEST_API_KEY');
variable_set('mailchimp_test_mode', TRUE);
variable_set('mailchimp_ecommerce_store_id', 1);
}