How to mock a class in php that is not passed via constructor or method argument ? (phpunit)
I am using phpunit and want to write unit tests for a class, which uses another class inside (instantiates object of it). This other class in not passed via constructor or method argument. For example in javascript you can mock…