コード例 #1
0
ファイル: HttpRequestTest.php プロジェクト: szeber/yapep_base
 /**
  * Test if the getCookie responses with the default set value if the parameter doesn't exist.
  */
 public function testNotExistedCookieWithDefaultValue()
 {
     $this->assertSame($this->request->getCookie('not_existed_cookie_param', 'default_value'), 'default_value');
 }
コード例 #2
0
ファイル: HttpSession.php プロジェクト: szeber/yapep_base
 /**
  * Returns the session ID from the request object. If the request has no session, it returns NULL.
  *
  * @return string
  */
 protected function getSessionId()
 {
     return $this->request->getCookie($this->cookieName, null);
 }