badoo/soft-mocks

How to change private method to public method

agxmaster opened this issue · 2 comments

change
private __construct(){}
to
public __construct(){}

You cannot do this using Soft Mocks, but you can call private methods using reflection:

You can call http://php.net/manual/ru/reflectionclass.newinstancewithoutconstructor.php and then call private method __construct.

six six six