function backendCase::testOrigin

8.0.x backendTest.php backendCase::testOrigin()
6.x backendTest.php backendCase::testOrigin()
7.x backendTest.php backendCase::testOrigin()
4.x backendTest.php backendCase::testOrigin()
5.x backendTest.php backendCase::testOrigin()
master backendTest.php backendCase::testOrigin()

File

tests/backendTest.php, line 60

Class

backendCase

Code

function testOrigin() {
  $exec = sprintf('%s %s version arg1 arg2 --simulate --ssh-options=%s | grep ssh', UNISH_DRUSH, self::escapeshellarg('user@server/path/to/drupal#sitename'), self::escapeshellarg('-i mysite_dsa'));
  $this->execute($exec);
  $bash = $this->escapeshellarg('drush  --invoke --simulate --uri=sitename --root=/path/to/drupal  version arg1 arg2 2>&1');
  $expected = "Simulating backend invoke: ssh -i mysite_dsa user@server $bash 2>&1";
  $output = $this->getOutput();
  $this->assertEquals($expected, $output, 'Expected ssh command was built');
}