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")); }
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')); }