/** * Write a config file that contains the shell-aliases array. */ static function setUpBeforeClass() { parent::setUpBeforeClass(); $contents = "\n <?php\n\n \$options['shell-aliases'] = array(\n 'glopts' => 'topic core-global-options',\n 'pull' => '!git pull',\n 'echosimple' => '!echo {{@target}}',\n 'echotest' => '!echo {{@target}} {{%root}} {{%mypath}}',\n 'compound-command' => '!cd {{%sandbox}} && echo second',\n );\n "; file_put_contents(UNISH_SANDBOX . '/drushrc.php', trim($contents)); mkdir(UNISH_SANDBOX . '/b'); $contents = "\n <?php\n\n \$options['shell-aliases'] = array(\n 'also' => '!echo alternate config file included too',\n );\n "; file_put_contents(UNISH_SANDBOX . '/b/drushrc.php', trim($contents)); $contents = "\n <?php\n\n \$aliases['myalias'] = array (\n 'root' => '/path/to/drupal',\n 'uri' => 'mysite.org',\n '#peer' => '@live',\n 'path-aliases' => array (\n '%mypath' => '/srv/data/mypath',\n '%sandbox' => '" . UNISH_SANDBOX . "'\n ),\n );\n "; file_put_contents(UNISH_SANDBOX . '/aliases.drushrc.php', trim($contents)); }
/** * Write a config file that contains our configuration file. */ static function setUpBeforeClass() { parent::setUpBeforeClass(); $contents = "\n <?php\n\n \$options['shell-aliases'] = array(\n 'uninstall' => 'pm-uninstall',\n );\n "; file_put_contents(UNISH_SANDBOX . '/drushrc.php', trim($contents)); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); // Copy in the command file, so the sandbox can find it. copy(dirname(dirname(__FILE__)) . '/situs.drush.inc', getenv('HOME') . '/.drush/situs.drush.inc'); }