private function log()
 {
     $logDir = Config::getInstance()->getString('logging/logDir');
     $logFile = "{$logDir}/" . $this->logFileName;
     $this->ensureDirExists($logFile);
     $fDate = Formatter::dateTimeUTC($this->endTime);
     $diff = $this->endTime - $this->startTime;
     $text = $this->text ? $this->text : "-";
     // If text is empty, set it to '-'.
     $fd = fopen($logFile, "a");
     fwrite($fd, "{$fDate}\t{$text}\t{$diff}\n");
     fclose($fd);
 }
 /**
  * @covers Formatter::dateTimeUTC
  * @covers Formatter::getUTCTimeZone
  */
 public function testDateTimeUTC()
 {
     $actual = $this->formatter->dateTimeUTC(1430469263, "Y-m-d H:i:s");
     $excepted = "2015-05-01 08:34:23 UTC";
     $this->assertEquals($excepted, $actual);
 }