Example #1
0
 public function testErrorGetExitCodeWhileRunning()
 {
     $this->skipIfNotUnix();
     $this->setExpectedException('RuntimeException', 'Cannot get exit code of still-running process.');
     $command = './tests/commands/unix/sleep_binary';
     $process = new Process(new UnixEnvironment(), $command, getcwd());
     $process->getExitCode();
 }
 public function testErrorGetExitCodeWhileRunning()
 {
     $this->skipIfNotWindows();
     $this->setExpectedException('RuntimeException', 'Cannot get exit code of still-running process.');
     $command = 'tests\\commands\\windows\\sleep.bat';
     $process = new Process(new WindowsEnvironment(), $command, getcwd());
     $process->getExitCode();
 }