public function pmUpdateCode::setUp

8.0.x pmUpdateCodeTest.php public pmUpdateCode::setUp()
6.x pmUpdateCodeTest.php public pmUpdateCode::setUp()
7.x pmUpdateCodeTest.php public pmUpdateCode::setUp()
4.x pmUpdateCodeTest.php public pmUpdateCode::setUp()
5.x pmUpdateCodeTest.php public pmUpdateCode::setUp()
master pmUpdateCodeTest.php public pmUpdateCode::setUp()

Download old core and older contrib releases which will always need updating.

File

tests/pmUpdateCodeTest.php, line 36
Prepare a codebase and upgrade it in several stages, exercising updatecode's filters.

Namespace

Unish

Class

pmUpdateCode
@group slow @group pm

Code

public function setUp() {
  if (UNISH_DRUPAL_MAJOR_VERSION >= 8) {
    // Make sure that we can still update from the previous release
    // to the current release.
    $core = $this->getPreviousStable("drupal-8");
    $modules_str = 'unish-8.x-1.2,honeypot-8.x-1.19-beta14';
    $this->modules = array('block', 'unish', 'honeypot');
  }
  elseif (UNISH_DRUPAL_MAJOR_VERSION == 7) {
    $core = '7.0-rc3';
    $modules_str = 'devel-7.x-1.0-rc1,webform-7.x-3.4-beta1';
    $this->modules = array('menu', 'devel', 'webform');
  }
  else {
    $core = '6.28';
    $modules_str = 'devel-6.x-1.26,webform-6.x-3.18';
    $this->modules = array('menu', 'devel', 'webform');
  }

  $sites = $this->setUpDrupal(1, TRUE, $core);
  $options = array(
    'root' => $this->webroot(),
    'uri' => key($sites),
    'yes' => NULL,
    'quiet' => NULL,
    'cache' => NULL,
    'skip' => NULL, // No FirePHP
    'strict' => 0,
  );

  $this->drush('pm-download', array($modules_str), $options);
  $this->drush('pm-enable', $this->modules, $options);
}