public function testInValidUrl() { $validator = new UriValidator(); $this->assertFalse($validator->isValid('ftp:example.com')); $this->assertFalse($validator->isValid('ex-ample')); $this->assertFalse($validator->isValid('XyZ://ex.ample.com')); $this->assertFalse($validator->isValid('ht-tp://ex.ample.com')); }
public function validate($input) { $validator = new UriValidatorImpl(); return $validator->isValid($input); }