public function testRunWithError() { $this->skipIfNotUnix(); $path = './tests/commands/unix/error_binary'; $command = new Command(new UnixEnvironment(), new NullProcessObserver(), $path, array(), getcwd()); $this->assertEquals(new ProcessOutput(5, '', 'Fatal Error' . PHP_EOL), $command->runSynchronous()); }
public function testWithAdHoc() { $path = './tests/commands/unix/test_binary'; $command = new Command(new MockEnvironment(), new NullProcessObserver(), $path, array('if=/dev/sha1 of=/dev/sdb2'), getcwd()); $this->assertSame($path . ' \'if=/dev/sha1 of=/dev/sdb2\'', $command->__toString()); }