Example #1
0
 public function testCookieWithAttributes()
 {
     $attributes = array('httponly', 'path' => '/');
     $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes);
     $this->assertEquals('requests-testcookie=testvalue', $cookie->formatForHeader());
     $this->assertEquals('requests-testcookie=testvalue; httponly; path=/', $cookie->formatForSetCookie());
 }