示例#1
0
文件: Message.php 项目: nxpthx/FLOW3
 /**
  * Removes the specified cookie from the headers of this message, if it exists
  *
  * This is a shortcut for $message->getHeaders()->removeCookie($name);
  *
  * @param string $name Name of the cookie to remove
  * @return void
  * @api
  */
 public function removeCookie($name)
 {
     $this->headers->removeCookie($name);
 }
示例#2
0
 /**
  * @test
  */
 public function cookiesCanBeRemoved()
 {
     $headers = new Headers();
     $headers->setCookie(new Cookie('Dark-Chocolate-Chip'));
     $this->assertTrue($headers->hasCookie('Dark-Chocolate-Chip'));
     $headers->removeCookie('Dark-Chocolate-Chip');
     $this->assertFalse($headers->hasCookie('Dark-Chocolate-Chip'));
 }