Re: Easy method of overriding built-in php functions.
| From: | Sara Golemon | Date: | Wed, 16 Aug 2017 20:31:52 +0000 |
| Subject: | Re: Easy method of overriding built-in php functions. | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100234@lists.php.net to get a copy of this message | ||
On Wed, Aug 16, 2017 at 4:02 PM, Ryan Jentzsch <ryan.jentzsch@gmail.com> 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 override the file_get_contents() function.
>
Short answer: No. There's no current, viable RFC for this purpose.
Personally, I don't expect one would pass.
-Sara