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)
10 calls to Drush_TestCase::escapeshellarg()
backendCase::testOrigin in tests/backendTest.php
Covers the following origin responsibilities.
backendCase::testTarget in tests/backendTest.php
Covers the following target responsibilities.
cacheCommandCase::testCacheGetSetClear in tests/cacheCommandTest.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+.

... See full list


tests/, line 127
Initialize a sandboxed environment. Starts with call unish_init() at bottom.




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