public function siteSshCase::testInteractive

8.0.x siteSshTest.php public siteSshCase::testInteractive()
6.x siteSshTest.php public siteSshCase::testInteractive()
7.x siteSshTest.php public siteSshCase::testInteractive()
5.x siteSshTest.php public siteSshCase::testInteractive()
master siteSshTest.php public siteSshCase::testInteractive()

Test drush ssh --simulate. No additional bash passed.

File

tests/siteSshTest.php, line 16
Tests for ssh.drush.inc

Namespace

Unish

Class

siteSshCase
@file Tests for ssh.drush.inc

Code

public function testInteractive() {
  if ($this->is_windows()) {
    $this->markTestSkipped('ssh command not currently available on Windows.');
  }

  $options = array(
    'simulate' => NULL,
  );
  $this->drush('ssh', array(), $options, 'user@server/path/to/drupal#sitename', NULL, self::EXIT_SUCCESS, '2>&1');
  $output = $this->getOutput();
  $expected = sprintf('Calling proc_open(ssh -o PasswordAuthentication=no -t %s@%s %s);', self::escapeshellarg('user'), self::escapeshellarg('server'), "'cd /path/to/drupal && bash -l'");
  $this->assertEquals($expected, $output);
}