You are here

public function UCXFTestCase::setUp in Extra Fields Checkout Pane 7

Same name and namespace in other branches
  1. 6.2 uc_extra_fields_pane.test \UCXFTestCase::setUp()

Install users and modules needed for all tests.

Parameters

$modules: Optional list of extra modules to install.

$permissions: Optional list of extra permissions for $this->adminUser.

Return value

void

Overrides UbercartTestHelper::setUp

1 call to UCXFTestCase::setUp()
UCXFCheckoutTestCase::setUp in ./uc_extra_fields_pane.test
Install payment modules
1 method overrides UCXFTestCase::setUp()
UCXFCheckoutTestCase::setUp in ./uc_extra_fields_pane.test
Install payment modules

File

./uc_extra_fields_pane.test, line 73
Automated tests for Extra Fields Pane

Class

UCXFTestCase
Base class for all Extra Fields Pane test cases.

Code

public function setUp($modules = array(), $permissions = array()) {
  $modules = array_merge(array(
    'uc_addresses',
    'uc_extra_fields_pane',
  ), $modules);
  $permissions = array_merge(array(
    'use php fields',
  ), $permissions);
  parent::setUp($modules, $permissions);

  // Reset the registered address fields. The hook hook_uc_addresses_fields()
  // can be called before Extra Fields Pane is installed, which can result
  // into an UcAddressesInvalidFieldException in these automated tests.
  drupal_static_reset('uc_addresses_get_address_fields');

  // Clear the field list cache.
  UCXF_FieldList::reset();
}