You are here

public function UbercartProductPowerToolsTestCase::setUp in Ubercart Product Power Tools 7

Overrides DrupalWebTestCase::setUp().

Overrides UbercartTestHelper::setUp

File

tests/uc_product_power_tools.test, line 21
Ubercart Product Power Tools Tests

Class

UbercartProductPowerToolsTestCase
@file Ubercart Product Power Tools Tests

Code

public function setUp($modules = array(), $permissions = array()) {
  parent::setUp(array(
    'uc_stock',
    'uc_shipping',
    'uc_product_power_tools',
    'token',
  ), array(
    'administer content types',
    'administer product power tools settings',
  ));
  $this
    ->drupalLogin($this->adminUser);
  $edit = array(
    'classes[product]' => 1,
  );
  $this
    ->drupalPost('admin/store/products/power-tools', $edit, t('Update'));
  $this
    ->assertText('Power Tools Class Settings updated.', 'Product Power Tools enabled for Product content type.');

  // Allow the default quantity to be set.
  variable_set('uc_product_add_to_cart_qty', TRUE);
}