public function testCliAuditWithLocalIPAddress()
 {
     unset($_SERVER["REMOTE_ADDR"]);
     $config = new Configuration();
     $config->setCurrentUser($this->ZfcUserMock);
     $ipaddress = $config->getIpAddress();
     $this->assertEquals("127.0.0.1", $ipaddress);
 }
 private function getRevisionId()
 {
     if ($this->revisionId === null) {
         $date = date_create("now")->format($this->platform->getDateTimeFormatString());
         if ($this->config->getCurrentUser() != null) {
             $userId = $this->config->getCurrentUser()->getId();
         } else {
             $userId = null;
         }
         $this->conn->insert($this->config->getRevisionTableName(), array('timestamp' => $date, 'user_id' => $userId, 'note' => $this->config->getNote(), 'ipaddress' => $this->config->getIpAddress()));
         $sequenceName = $this->platform->supportsSequences() ? 'REVISIONS_ID_SEQ' : null;
         $this->revisionId = $this->conn->lastInsertId($sequenceName);
     }
     return $this->revisionId;
 }