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()

File

tests/siteSshTest.php, line 14

Class

siteSshCase

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 %s@%s);', self::escapeshellarg('user'), self::escapeshellarg('server'));
  $this->assertEquals($expected, $output);
}