예제 #1
0
 /**
  * Checks if the constructor accepts a single suffix (string parameter).
  */
 public function testConstructorAcceptsSingleSuffix()
 {
     $this->validator = new Mol_Validate_Suffix('.jpg');
     $suffixes = $this->validator->getSuffixes();
     $this->assertEquals(array('.jpg'), $suffixes);
 }
예제 #2
0
 /**
  * Returns the allowed hostnames.
  *
  * An empty array the hostname is not restricted.
  *
  * @return array(string)
  */
 public function getAllowedHostnames()
 {
     $suffixes = $this->_hostnameValidator->getSuffixes();
     return $this->toHostnames($suffixes);
 }