I have been trying to find how to do this for the last 2 days without any success. How can I override the return of a native PHP function called in the tested class from the test class ? I do not want to litter the business class with test code, so redefine the PHP function above the tested class is not a solution.
I am surprised there is no functionnality for this in the Codeception framework. Without it, I just cannot use it.
If someone knows a solution, I would be grateful to get it.