Ejemplo n.º 1
0
 public function testFromSetCookieHeaderSetsCookieAttributes()
 {
     $cookie = new Cookie();
     $cookie->fromSetCookieHeader('SESSION=asdf; expires=' . date('r', strtotime('2000-01-01 00:00:00')) . '; path=/; domain=.example.com; secure', 'www.example.com');
     $this->assertEquals('SESSION', $cookie->getName());
     $this->assertEquals('asdf', $cookie->getValue());
     $this->assertEquals(array('expires' => date('r', strtotime('2000-01-01 00:00:00')), 'path' => '/', 'domain' => '.example.com', 'secure' => null), $cookie->getAttributes());
 }