예제 #1
0
 public function testShouldBeAlertedReturnsTrueWithSettingAll()
 {
     $this->user->setAlertSetting(AlertSetting::ALL);
     foreach (ResultStatus::getAll() as $status) {
         $result = $this->getMockResult();
         $result->setStatus($status)->setInfo("Stahp shut up and take my money scumbag stacy trollface.");
         $this->assertTrue($this->user->shouldBeAlerted($result));
     }
 }
예제 #2
0
 /**
  * Set result
  *
  * @param string $status
  * @return TestResult
  */
 public function setStatus($status)
 {
     ResultStatus::isValid($status);
     $this->status = $status;
     return $this;
 }
예제 #3
0
 /**
  * @param \DateTime $start
  */
 private function getSummary(\DateTime $start)
 {
     $end = new \DateTime();
     $runTime = $end->diff($start, true);
     $summary = "";
     foreach (ResultStatus::getAll() as $status) {
         $summary .= $this->getColouredStatus($status, $this->results[$status]) . ", ";
     }
     $summary .= "in " . $runTime->i . " minutes and " . $runTime->s . " seconds";
     return $summary;
 }