/**
  * @param ExitStatus $exitStatus
  *
  * @return $this
  */
 public function setExitStatus(ExitStatus $exitStatus)
 {
     $this->exitStatus = $exitStatus;
     $this->exitCode = $exitStatus->getExitCode();
     $this->exitDescription = $exitStatus->getExitDescription();
     return $this;
 }
 public function testAddExitCodeToSameStatus()
 {
     $executing1 = new ExitStatus(ExitStatus::EXECUTING);
     $executing2 = new ExitStatus(ExitStatus::EXECUTING);
     $executing3 = new ExitStatus(ExitStatus::EXECUTING);
     $status = $executing1->setExitCode($executing2->getExitCode());
     $this->assertTrue($executing3 !== $status);
     $this->assertEquals($executing3->getExitCode(), $status->getExitCode());
 }