/** * 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); }
/** * 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); }