Esempio n. 1
0
 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'));
 }
Esempio n. 2
0
 public function validate($input)
 {
     $validator = new UriValidatorImpl();
     return $validator->isValid($input);
 }