Say I am testing the following class in PHPUnit:
class ExampleClass
{
public function exampleMethod()
{
exampleHelperfunction('firstArg', 'secondArg');
}
}
How can I test if exampleHelperFunction
was called with the arguments 'firstArg'
and 'secondArg'
when exampleMethod
was run?
In other words, how can I mock functions that are not class methods?
Aucun commentaire:
Enregistrer un commentaire