You are here

public function UcAddressesUpgradeTestCase::setUp in Ubercart Addresses 7

Installs filled Drupal 6 database.

Overrides UpgradePathTestCase::setUp

File

tests/uc_addresses.upgrade.test, line 29
Test cases for upgrades from previous versions.

Class

UcAddressesUpgradeTestCase
Upgrade tests.

Code

public function setUp() {

  // Path to the database dump files.
  $this->databaseDumpFiles = array(
    drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-6.bare.database.php',
    drupal_get_path('module', 'uc_addresses') . '/tests/upgrade/uc_store.database.php',
    drupal_get_path('module', 'uc_addresses') . '/tests/upgrade/uc_addresses-6x1x.database.php',
  );
  parent::setUp();
  $this
    ->uninstallModulesExcept(array(
    'uc_store',
    'uc_addresses',
  ));

  // UC Store set variables.
  $this
    ->variable_set('date_format_uc_store', 'm/d/Y');
  $this
    ->variable_set('uc_address_format_840', "!company\n" . "!first_name !last_name\n" . "!street1\n" . "!street2\n" . "!city, !zone_code !postal_code\n" . "!country_name_if");
  $this
    ->variable_set('uc_address_format_124', "!company\n" . "!first_name !last_name\n" . "!street1\n" . "!street2\n" . "!city, !postal_code\n" . "!zone_name, !country_name");
}