/** * Checks if the specified cookie exists * * This is a shortcut for $message->getHeaders()->hasCookie($name); * * @param string $name Name of the cookie * @return boolean * @api */ public function hasCookie($name) { return $this->headers->hasCookie($name); }
/** * See FLOW-12 * * @test */ public function cookiesWithEmptyNameAreIgnored() { $headers = new Headers(); $headers->set('Cookie', ['cookie1=the+value+number+1; =foo']); $this->assertTrue($headers->hasCookie('cookie1')); $this->assertEquals('the value number 1', $headers->getCookie('cookie1')->getValue()); }