public static function Drush_TestCase::escapeshellarg

6.x public static Drush_TestCase::escapeshellarg($arg)
4.x public static Drush_TestCase::escapeshellarg($arg)
5.x public static Drush_TestCase::escapeshellarg($arg)
9 calls to Drush_TestCase::escapeshellarg()
backendCase::testOrigin in tests/backendTest.php
backendCase::testTarget in tests/backendTest.php
Drush_CommandTestCase::drush in tests/
Invoke drush in via execute().
Drush_CommandTestCase::execute in tests/
Actually runs the command. Does not trap the error stream output as this need PHP 4.3+.
shellAliasesCase::testShellAliasDrushRemote in tests/shellAliasTest.php

... See full list


tests/, line 126




public static function escapeshellarg($arg) {
  // Short-circuit escaping for simple params (keep stuff readable)
  if (preg_match('|^[a-zA-Z0-9.:/_-]*$|', $arg)) {
    return $arg;
  elseif (self::is_windows()) {
    return self::_escapeshellarg_windows($arg);
  else {
    return escapeshellarg($arg);