public function information() { $p = new Process($this->executable(), array('-v')); try { $this->assertEquals(-1, $p->exitValue(), 'Process should not have exited yet'); $this->assertNotEquals(0, $p->getProcessId()); $this->assertNotEquals('', $p->getFilename()); $this->assertTrue(create(new \lang\types\String($p->getCommandLine()))->contains('-v')); $p->close(); } catch (\unittest\AssertionFailedError $e) { $p->close(); // Ensure process is closed throw $e; } }
public function information() { $p = new Process($this->executable(), $this->arguments('-v')); try { $this->assertEquals(-1, $p->exitValue(), 'Process should not have exited yet'); $this->assertNotEquals(0, $p->getProcessId()); $this->assertNotEquals('', $p->getFilename()); $this->assertNotEquals(false, strpos($p->getCommandLine(), '-v')); $p->close(); } catch (AssertionFailedError $e) { $p->close(); // Ensure process is closed throw $e; } }