You are here

public function OgMigrateGroupMembershipTestCase::setUp in Organic groups 7

Override of UpgradePathTestCase::setUp() specialized for upgrade testing.

Overrides OgUpgradePathTestCase::setUp

File

./og.test, line 1390

Class

OgMigrateGroupMembershipTestCase
Migrate group membership test.

Code

public function setUp() {

  // Path to the database dump.
  $this->databaseDumpFiles = array(
    drupal_get_path('module', 'og') . '/tests/drupal-7.og.update_7001.database.php',
  );
  parent::setUp();
  $this
    ->drupalLogout();
  $admin_user = $this
    ->drupalCreateUser(array(
    'access administration pages',
    'administer software updates',
  ));
  $this
    ->drupalLogin($admin_user);
  $this
    ->performUpgrade();
  module_enable(array(
    'og_migrate',
  ));
  menu_rebuild();

  // Set small batch sizes, so we can simulate upgrade with many records.
  variable_set('og_update_batch_size', 3);
}