Ejemplo n.º 1
0
 public function testExecuteWithErrorsReturnsExpectedResult()
 {
     $process = new Process();
     $process->setCommand("php -r \"trigger_error('error', E_USER_ERROR);\"");
     $result = $process->execute();
     $this->assertSame(255, $result->getStatus());
     $this->assertTrue($result->hasErrors());
     $this->assertContains("PHP Fatal error", $result->getStdErrContents());
 }