function commandSpecificCase::setUp

8.0.x commandSpecificTest.php commandSpecificCase::setUp()
6.x commandSpecificTest.php commandSpecificCase::setUp()
7.x commandSpecificTest.php commandSpecificCase::setUp()
5.x commandSpecificTest.php commandSpecificCase::setUp()
master commandSpecificTest.php commandSpecificCase::setUp()

Try to write a tiny drushrc.php to each place that drush checks. Also write a sites/dev/aliases.drushrc.php file to the sandbox.

File

tests/commandSpecificTest.php, line 19

Namespace

Unish

Class

commandSpecificCase
Assure that context API behaves as designed. Mostly implicitly tested, but we do have some edges that need explicit testing. *

Code

function setUp() {
  parent::setUp();

  $path = UNISH_SANDBOX . '/aliases.drushrc.php';
  $aliases['site1'] = array(
    'root' => UNISH_SANDBOX,
    'uri' => 'site1.com',
    'source-command-specific' => array(
      'core-rsync' => array(
        'exclude-paths' => 'excluded_by_source',
      ),
    ),
    'target-command-specific' => array(
      'core-rsync' => array(
        'exclude-paths' => 'excluded_by_target',
      ),
    ),
    'path-aliases' => array(
      '%files' => 'sites/default/files',
    ),
  );
  $contents = $this->unish_file_aliases($aliases);
  $return = file_put_contents($path, $contents);
}