nette/tester — pull request #169 by milo (2014-09-16 10:06:09+00:00)
Title: Add Assert::command() assertion

It is useful for user's binaries easy check. But I cannot decide:

1) parameters order; isn't `command($command, $output = NULL, $exitCode = 0)` better?

2) what about let out `$output` at all? Usage: `$output = Assert::command($command, $exitCode = 0);`

3) Normalize output EOL? The `system()` keeps EOL as is, but it can be done by `exec($cmd, $out)` and `$output = implode("\n", $out)`

4) Allow `$command` be an array? And if array, escapeshell() every item?

5) Stderr issue. Ordinary exec function does not return a stderr. The only way, afaik, is `proc_open()` but it is problematic on windows. It can be done by `Assert::command('some command 2>&1')`.