Esempio n. 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));
     }
 }
Esempio n. 2
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;
 }