public function MailchimpEcommerceTestCase::testAddStore in Mailchimp E-Commerce 7
Tests adding a store to Mailchimp.
File
- tests/
mailchimp_ecommerce.test, line 70 - Test class and methods for the Mailchimp eCommerce module.
Class
- MailchimpEcommerceTestCase
- Tests for Mailchimp eCommerce core integration.
Code
public function testAddStore() {
$store_id = 1;
$store = [
'list_id' => '57afe96172',
'name' => 'Freddie\'s Merchandise',
'currency_code' => 'USD',
];
mailchimp_ecommerce_add_store($store_id, $store, 'Drupal Commerce');
$saved_store = mailchimp_ecommerce_get_store($store_id);
$this
->assertEqual($saved_store->id, $store_id);
$this
->assertEqual($saved_store->name, $store['name']);
$this
->assertEqual($saved_store->currency_code, $store['currency_code']);
}