Пример #1
0
 /**
  * Ensures that hasHostnameRestrictions() returns true if a whitelist of hostnames
  * was passed to the validator.
  */
 public function testHasHostnameRestrictionsReturnsTrueIfHostnamesAreWhitelisted()
 {
     $this->validator->setAllowedHostnames(array('google.de'));
     $this->assertTrue($this->validator->hasHostnameRestrictions());
 }
Пример #2
0
 /**
  * Checks if hostname restrictions are active.
  *
  * @return boolean True if the hostname is restricted, false otherwise.
  */
 public function hasHostnameRestrictions()
 {
     return $this->_urlValidator->hasHostnameRestrictions();
 }