You are here

public function BotchaUpdatePathTestCase::setUp in BOTCHA Spam Prevention 7.3

Overrides DrupalWebTestCase::setUp() for upgrade testing.

Overrides UpgradePathTestCase::setUp

See also

DrupalWebTestCase::prepareDatabasePrefix()

DrupalWebTestCase::changeDatabasePrefix()

DrupalWebTestCase::prepareEnvironment()

File

tests/upgrade/update.botcha.test, line 22
Provides upgrade path tests for the Botcha module. If test failed and didn't get finished - you should patch Drupal core.

Class

BotchaUpdatePathTestCase
Tests the Botcha 7.x-1.0 -> 7.x-3.x upgrade path.

Code

public function setUp() {

  // Use the filled upgrade path and our trigger data.
  $this->databaseDumpFiles = array(
    drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.filled.standard_all.database.php.gz',
  );
  parent::setUp();

  // To isolate our modules.
  $this
    ->uninstallModulesExcept(array(
    'comment',
    'moopapi',
    'botcha',
  ));

  // Re-register the autoload functions that were unregistered by
  // UpdatePathTestCase::setUp(), because it also loads some module files
  // that work with classes.
  spl_autoload_register('drupal_autoload_class');
  spl_autoload_register('drupal_autoload_interface');
  registry_rebuild();
}