/**
  * Checks if the magic $listOfAllowedHostnames attribute contains the whitelisted
  * hostnames.
  *
  * This attribute can be referenced in failure messages via %allowedHostnames%.
  */
 public function testListOfAllowedHostnamesAttributeContainsAllowedHostnames()
 {
     $this->validator->setAllowedHostnames(array('github.com', 'google.de'));
     $list = $this->validator->listOfAllowedHostnames;
     $this->assertInternalType('string', $list);
     $this->assertContains('github.com', $list);
     $this->assertContains('google.de', $list);
 }
Beispiel #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();
 }