Esempio n. 1
0
 /**
  * Tests that setting custom options via constructor
  * @return void
  */
 public function testConstructOptions()
 {
     $cookie = new Cookie(array('expires' => 100, 'path' => '/foo', 'domain' => 'www.bar.com', 'secure' => true, 'httponly' => true, 'name' => 'test_name', 'value' => 'test_value'));
     $this->assertEquals(100, $cookie->getExpires());
     $this->assertEquals('/foo', $cookie->getPath());
     $this->assertEquals('www.bar.com', $cookie->getDomain());
     $this->assertTrue($cookie->isSecure());
     $this->assertTrue($cookie->isHttponly());
     $this->assertEquals('test_name', $cookie->getName());
     $this->assertEquals('test_value', $cookie->getValue());
 }