Esempio n. 1
0
 public function testSecure()
 {
     $secret = sha1(self::TEST_URL);
     $url = new \Curry_URL(self::TEST_URL);
     $secureUrl = $url->getAbsolute('&', $secret);
     $url = new \Curry_URL($secureUrl);
     $this->assertNotEmpty($url->getVar('hash'));
     $this->assertTrue($url->isValid($secret));
     \Curry_URL::setDefaultSecret(sha1($secret));
     $url = new \Curry_URL(self::TEST_URL);
     $secureUrl = $url->getAbsolute('&', true);
     $url = new \Curry_URL($secureUrl);
     $this->assertNotEmpty($url->getVar('hash'));
     $this->assertTrue($url->isValid());
 }