Exemplo n.º 1
0
 /**
  * Creates session cookie for testing.
  */
 public static function setSessionCookie($sessionId = NULL, $sessionCreatedDate = NULL, $lastRenewedDate = NULL)
 {
     $sessionId = $sessionId == NULL ? \ApplicationInsights\Channel\Contracts\Utils::returnGuid() : $sessionId;
     $sessionCreatedDate == NULL ? $sessionCreatedDate = time() : $sessionCreatedDate;
     $lastRenewedDate == NULL ? $lastRenewedDate = time() : $lastRenewedDate;
     $_COOKIE['ai_session'] = $sessionId . '|' . \ApplicationInsights\Channel\Contracts\Utils::returnISOStringForTime($sessionCreatedDate) . '|' . \ApplicationInsights\Channel\Contracts\Utils::returnISOStringForTime($lastRenewedDate);
 }