예제 #1
0
 /**
  * Checks whether previously run command failed|passed.
  *
  * @Then /^the command should (fail|pass)$/
  *
  * @param string $success "fail" or "pass"
  */
 public function itShouldPass($success)
 {
     if ('fail' === $success) {
         if (0 === $this->getExitCode()) {
             echo 'Actual output:' . PHP_EOL . PHP_EOL . $this->getOutput();
         }
         $this->asserter->integer($this->getExitCode())->isNotEqualTo(0);
     } else {
         if (0 !== $this->getExitCode()) {
             echo 'Actual output:' . PHP_EOL . PHP_EOL . $this->getOutput();
         }
         $this->asserter->integer($this->getExitCode())->isEqualTo(0);
     }
 }