setCookie() public method

Set Cookie
public setCookie ( string $name, string $value = '', integer | string | DateTime $expire, string $path = '/', string $domain = '', boolean $secure = false, boolean $httpOnly = false ) : void
$name string
$value string
$expire integer | string | DateTime
$path string
$domain string
$secure boolean
$httpOnly boolean
return void
Example #1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testSetCookieWithWrongDateNameThrowException()
 {
     $this->response->setCookie('foo', 'bar', 'the day before sunday');
 }