On 16 August 2017 at 21:02, Ryan Jentzsch wrote:
>
> Is there an RFC that I didn't find that allows for easily overriding
>built-in functions?
No, but there is an extension: https://pecl.php.net/package/uopz
However, I believe the maintainer of it recommends avoiding using it
if at all possible
On 8/16/17 3:02 PM, Ryan Jentzsch wrote:
> I am aware of Advanced PHP debugger but what I need this type of
> functionality for is mocking and testing.
If you're using namespaces you can try overriding the built-in functions
that way. I've done this successfully in my own library for mocking ldap
On Wed, Aug 16, 2017 at 4:02 PM, Ryan Jentzsch wrote:
> As an example I want to use PHPUnit mocking feature to create a mock of a
> class. However in the constructor of this class is the following line to
> get the expected JSON string:
>
> $result = file_get_contents('php://input');
>
> I can not