Level 53
I can't think of a way off the top of my head and I know there isn't a specific test wrapper in Laravel testing so maybe have a look at this:
Say I am testing the following class in PHPUnit:
class ExampleClass
{
public function exampleMethod()
{
example_helper_function('firstArg', 'secondArg');
}
}
How can I test if example_helper_function 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?
Please or to participate in this conversation.