class myclass {
private $myemail = '';
private $myPrefix = '';
/**
* @return string
*/
public function getmyPrefix()
{
return $this->myPrefix;
}
/**
* @return string
*/
public function getmyEmail()
{
return $this->myemail;
}
/**
* @param string $email
*/
public function setmyEmail($email)
{
$this->myemail = $email;
}
}
I want to write a php unit tests to test the private variables in this class but I am not sure how to test the variable $myPrefix because it does not have a setter ? Do I need to create a mock class ?
Thanks