Example #1
0
 /**
  * Checks if setAllowedHostnames() overwrites the previously provided
  * list of hostnames.
  */
 public function testSetAllowedHostnamesOverwritesPreviousHostnames()
 {
     $this->validator->setAllowedHostnames(array('github.com'));
     $this->validator->setAllowedHostnames(array('google.de'));
     $this->assertEquals(array('google.de'), $this->validator->getAllowedHostnames());
 }
Example #2
0
 /**
  * Returns a list of allowed hostnames.
  *
  * @return array(string)
  */
 public function getAllowedHostnames()
 {
     return $this->_urlValidator->getAllowedHostnames();
 }