Exemplo n.º 1
0
 function testHostValidity() {
     $cookie = new SimpleCookie("name");
     $cookie->setHost("this.host.name.here");
     $this->assertTrue($cookie->isValidHost("host.name.here"));
     $this->assertTrue($cookie->isValidHost("that.host.name.here"));
     $this->assertFalse($cookie->isValidHost("bad.host"));
     $this->assertFalse($cookie->isValidHost("nearly.name.here"));
 }
Exemplo n.º 2
0
 public function testHostValidity()
 {
     $cookie = new SimpleCookie('name');
     $cookie->setHost('this.host.name.here');
     $this->assertTrue($cookie->isValidHost('host.name.here'));
     $this->assertTrue($cookie->isValidHost('that.host.name.here'));
     $this->assertFalse($cookie->isValidHost('bad.host'));
     $this->assertFalse($cookie->isValidHost('nearly.name.here'));
 }