You are here

public function SimpleNewsUpgradePathTestCase::prepareUpgradePath in Simplenews 7.2

Same name and namespace in other branches
  1. 7 tests/simplenews.test \SimpleNewsUpgradePathTestCase::prepareUpgradePath()
2 calls to SimpleNewsUpgradePathTestCase::prepareUpgradePath()
SimpleNewsUpgradePath61TestCase::testSimplenewsUpgrade in tests/simplenews.test
Test a successful upgrade.
SimpleNewsUpgradePath62TestCase::testSimplenewsUpgrade in tests/simplenews.test
Test a successful upgrade.

File

tests/simplenews.test, line 1918
Simplenews test functions.

Class

SimpleNewsUpgradePathTestCase

Code

public function prepareUpgradePath() {

  // Delete everything except taxnomy and simplenews from system to
  // prevent their update functions to be run.
  $this
    ->uninstallModulesExcept(array(
    'taxonomy',
    'simplenews',
  ));

  // Disable simplenews, the update hooks will be executed anyway.
  db_update('system')
    ->fields(array(
    'status' => 0,
  ))
    ->condition('name', 'simplenews')
    ->execute();
}