X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrush%2Fdrush%2Ftests%2FSiteSshTest.php;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FSiteSshTest.php;h=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=18e58d5e22d4878d895651ea3470948ae5ce643d;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/drush/drush/tests/SiteSshTest.php b/vendor/drush/drush/tests/SiteSshTest.php deleted file mode 100644 index 18e58d5e2..000000000 --- a/vendor/drush/drush/tests/SiteSshTest.php +++ /dev/null @@ -1,78 +0,0 @@ -isWindows()) { - $this->markTestSkipped('ssh command not currently available on Windows.'); - } - - $options = [ - 'simulate' => null, - ]; - $this->drush('ssh', [], $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 = [ - 'cd' => '0', - 'simulate' => null, - ]; - $this->drush('ssh', ['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 = [ - 'cd' => '0', - 'simulate' => null, - ]; - $this->drush('ssh', ['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 = [ - 'cd' => '0', - 'simulate' => null, - ]; - $this->drush('ssh', ['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); - } -}