コード例 #1
0
 public function testErrorGetPidNotRunning()
 {
     $this->skipIfNotUnix();
     $this->setExpectedException('RuntimeException', 'Cannot get the process id of a process that has already exited.');
     $command = './tests/commands/unix/test_binary';
     $process = new Process(new UnixEnvironment(), $command, getcwd());
     $process->wait();
     $process->getPid();
 }
コード例 #2
0
 public function testErrorGetPidNotRunning()
 {
     $this->skipIfNotWindows();
     $this->setExpectedException('RuntimeException', 'Cannot get the process id of a process that has already exited.');
     $command = 'tests\\commands\\windows\\test.bat';
     $process = new Process(new WindowsEnvironment(), $command, getcwd());
     $process->wait();
     $process->getPid();
 }