setCookie() public method

set item to cookie
Since: 2.2.0
public setCookie ( string $key = null, string $value = null )
$key string key of the item
$value string value of the item
Beispiel #1
0
 /**
  * testCookie
  *
  * @since 2.2.0
  */
 public function testCookie()
 {
     /* setup */
     Request::setCookie('testKey', 'testValue');
     /* result */
     $result = Request::getCookie('testKey');
     /* compare */
     $this->assertEquals('testValue', $result);
 }