function CommerceFreeShippingTestProcess::setUp in Commerce Free Shipping 7
Implementation of setUp().
Overrides DrupalWebTestCase::setUp
File
- tests/
commerce_free_shipping.test, line 37 - Functional tests for the commerce free shipping module.
Class
- CommerceFreeShippingTestProcess
- Test checkout process.
Code
function setUp() {
$modules = parent::setUpHelper('all', array(
'commerce_shipping',
'commerce_free_shipping',
'commerce_flat_rate',
));
parent::setUp($modules);
// User creation for different operations.
$permissions = $this
->permissionBuilder('site admin');
// Add shipping permissions to site admin set.
$permissions[] = 'administer shipping';
$site_admin = $this
->drupalCreateUser($permissions);
$this->site_admin = $site_admin;
$permissions = $this
->permissionBuilder('store admin');
// Add shipping permissions to site admin set.
$permissions[] = 'administer shipping';
$store_admin = $this
->drupalCreateUser($permissions);
$this->store_admin = $store_admin;
$permissions = $this
->permissionBuilder('store customer');
$store_customer = $this
->drupalCreateUser($permissions);
$this->store_customer = $store_customer;
// 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();
}