Example #1
0
 /**
  * Get the footer for a test collection containing all successful
  * tests
  *
  * @return string
  */
 private function getSuccessFooter()
 {
     $tests = $this->results->getTotalTests();
     $asserts = $this->results->getTotalAssertions();
     return $this->green(sprintf("OK (%d test%s, %d assertion%s)\n", $tests, $tests == 1 ? '' : 's', $asserts, $asserts == 1 ? '' : 's'));
 }
Example #2
0
 /**
  * Get the footer for a test collection that had tests with
  * failures or errors
  *
  * @return string
  */
 private function getFailedFooter()
 {
     $formatString = "FAILURES!\nTests: %d, Assertions: %d, Failures: %d, Errors: %d.\n";
     return "\n" . $this->red(sprintf($formatString, $this->results->getTotalTests(), $this->results->getTotalAssertions(), $this->results->getTotalFailures(), $this->results->getTotalErrors()));
 }