コード例 #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"));
 }
コード例 #2
0
ファイル: cookies_test.php プロジェクト: guicara/simpletest
 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'));
 }