public function paintFooter($test_name) { $duration = microtime(true) - $this->testsStart; $memory = memory_get_usage() - $this->memoryStart; $style = $this->getFailCount() > 0 ? 'error' : ($this->getExceptionCount() > 0 ? 'warning' : 'success'); if ($this->getFailCount() + $this->getExceptionCount() == 0) { print AkAnsiColor::style("\nOK", $style); } else { $this->log_time = false; print AkAnsiColor::style("\nFAILURES!!!", $style); } $this->time_log['total'] = array($duration, $memory); print AkAnsiColor::style("\n\nTest cases completed in " . $duration . "/s using " . AkNumberHelper::human_size($memory) . ":\n " . $this->getTestCaseProgress() . "/" . $this->getTestCaseCount() . ", Passes: " . $this->getPassCount() . ", Failures: " . $this->getFailCount() . ", Exceptions: " . $this->getExceptionCount() . "\n", $style); }
static function human_size($size) { return AkNumberHelper::number_to_human_size($size); }