public function MailchimpEcommerceCommerceTestCase::testAddStore in Mailchimp E-Commerce 7
Tests adding a store to Mailchimp.
File
- modules/
mailchimp_ecommerce_commerce/ tests/ mailchimp_ecommerce_commerce.test, line 71 - Test class and methods for the Mailchimp eCommerce Commerce module.
Class
- MailchimpEcommerceCommerceTestCase
- Tests for Mailchimp eCommerce integration with Drupal Commerce.
Code
public function testAddStore() {
$admin = $this
->drupalCreateUser([
'administer site configuration',
'administer mailchimp',
]);
$this
->drupalLogin($admin);
$edit = [];
$edit['mailchimp_ecommerce_integration'] = 'commerce';
$edit['mailchimp_ecommerce_store_name'] = 'Freddie\'s Merchandise';
$edit['mailchimp_ecommerce_list_id'] = '57afe96172';
$edit['mailchimp_ecommerce_currency'] = 'USD';
$this
->drupalPost('admin/config/services/mailchimp/ecommerce', $edit, t('Save configuration'));
$this
->assertText(t('The configuration options have been saved.'), 'The text "The configuration options have been saved." appears on the page that adds a store.');
}