Need to mock two functions within a class ,one is declared as public and another one is private.
Eg:
class Name {
public function foo()
{
$res = $this->bar($arguments);
$return = $res;
}
private function bar($args)
{
//Do some coding
return something;
}
}
source https://stackoverflow.com/questions/68573978/how-to-test-a-function-with-in-a-function-in-phpunittest-that-declared-as-privat
Comments
Post a Comment