X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Ftests%2FsiteSshTest.php;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FsiteSshTest.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=0cf8c5823e4027d3afa02bef308fd019db68ae9b;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/drush/drush/tests/siteSshTest.php b/vendor/drush/drush/tests/siteSshTest.php deleted file mode 100644 index 0cf8c5823..000000000 --- a/vendor/drush/drush/tests/siteSshTest.php +++ /dev/null @@ -1,73 +0,0 @@ -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); - } - - /** - * Test drush ssh --simulate 'date'. - * @todo Run over a site list. drush_sitealias_get_record() currently cannot - * handle a site list comprised of longhand site specifications. - */ - public function testNonInteractive() { - $options = array( - 'cd' => '0', - 'simulate' => NULL, - ); - $this->drush('ssh', array('date'), $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 %s);', self::escapeshellarg('user'), self::escapeshellarg('server'), self::escapeshellarg('date')); - $this->assertEquals($expected, $output); - } - - /** - * Test drush ssh with multiple arguments (preferred form). - */ - public function testSshMultipleArgs() { - $options = array( - 'cd' => '0', - 'simulate' => NULL, - ); - $this->drush('ssh', array('ls', '/path1', '/path2'), $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 %s);', self::escapeshellarg('user'), self::escapeshellarg('server'), self::escapeshellarg('ls /path1 /path2')); - $this->assertEquals($expected, $output); - } - - /** - * Test drush ssh with multiple arguments (legacy form). - */ - public function testSshMultipleArgsLegacy() { - $options = array( - 'cd' => '0', - 'simulate' => NULL, - ); - $this->drush('ssh', array('ls /path1 /path2'), $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 %s);', self::escapeshellarg('user'), self::escapeshellarg('server'), self::escapeshellarg('ls /path1 /path2')); - $this->assertEquals($expected, $output); - } -}