$cookie =
new Cookie('foo', 'bar', 0
);
$this->
assertEquals('/',
$cookie->
getPath(), '->getPath() returns / is no path is defined'
);
$cookie =
new Cookie('foo', 'bar', 0, '/foo'
);
$this->
assertEquals('/foo',
$cookie->
getPath(), '->getPath() returns the cookie path'
);
} public function testGetDomain() { $cookie =
new Cookie('foo', 'bar', 0, '/', 'foo.com'
);
$this->
assertEquals('foo.com',
$cookie->
getDomain(), '->getDomain() returns the cookie domain'
);
} public function testIsSecure() { $cookie =
new Cookie('foo', 'bar'
);
$this->
assertFalse($cookie->
isSecure(), '->isSecure() returns false if not defined'
);
$cookie =
new Cookie('foo', 'bar', 0, '/', 'foo.com', true
);
$this->
assertTrue($cookie->
isSecure(), '->isSecure() returns the cookie secure flag'
);
}