I have below code with getter method and immutable object to get and parse URL :
class MyProg {
private $url;
public function __construct($url) {
$this->url = $url;
}
public function getUrl() {
return $this->url;
}
public function __toString() {
return $this->url;
}
}
$c1 = new MyProg('http://www.google.com');
I am being told to create UNITTEST for all public method , Is it possible to create to Check Valid URL unit test for this page ? I have tried but havent found any.
Any help woulld be appreciated
Aucun commentaire:
Enregistrer un commentaire