Example #1
0
 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());
 }
Example #2
0
 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());
 }