public static function Drush_TestCase::setUpBeforeClass

6.x drush_testcase.inc public static Drush_TestCase::setUpBeforeClass()
4.x drush_testcase.inc public static Drush_TestCase::setUpBeforeClass()
5.x drush_testcase.inc public static Drush_TestCase::setUpBeforeClass()

Assure that each class starts with an empty sandbox directory and a clean environment - http://drupal.org/node/1103568.

File

tests/drush_testcase.inc, line 27

Class

Drush_TestCase

Code

public static function setUpBeforeClass() {
  $sandbox = UNISH_SANDBOX;
  if (file_exists($sandbox)) {
    unish_file_delete_recursive($sandbox);
  }
  $ret = mkdir($sandbox, 0777, TRUE);
  chdir(UNISH_SANDBOX);

  mkdir(getenv('HOME') . '/.drush', 0777, TRUE);
  mkdir($sandbox . '/etc/drush', 0777, TRUE);
  mkdir($sandbox . '/share/drush/commands', 0777, TRUE);
}