/** * 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()); }
/** * Checks if hostname restrictions are active. * * @return boolean True if the hostname is restricted, false otherwise. */ public function hasHostnameRestrictions() { return $this->_urlValidator->hasHostnameRestrictions(); }