diff --git a/src/Common/CommandArguments.php b/src/Common/CommandArguments.php index d1984cff4..4fc3a90f8 100644 --- a/src/Common/CommandArguments.php +++ b/src/Common/CommandArguments.php @@ -40,7 +40,7 @@ public function args($args) if (!is_array($args)) { $args = $func_args; } - $this->arguments .= ' ' . implode(' ', array_map(static::class . '::escape', $args)); + $this->arguments .= ' ' . implode(' ', array_map([static::class, 'escape'], $args)); return $this; } diff --git a/tests/phpunit/Task/ExecTest.php b/tests/phpunit/Task/ExecTest.php new file mode 100644 index 000000000..cd8d958f4 --- /dev/null +++ b/tests/phpunit/Task/ExecTest.php @@ -0,0 +1,19 @@ +assertSame( + 'ls', + (new \Robo\Task\Base\Exec('ls')) + ->getCommand() + ); + } +}