Re: BC break: ReflectionMethod::invoke() expects parameter1to be object, string given
| From: | Alexander Lisachenko | Date: | Tue, 23 Aug 2016 15:45:12 +0000 |
| Subject: | Re: BC break: ReflectionMethod::invoke() expects parameter1to be object, string given | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95420@lists.php.net to get a copy of this message | ||
2016-08-23 18:05 GMT+03:00 Lauri Kenttä <lauri.kentta@gmail.com>:
> Could you do it without reflection, then? I don't think so.
> Thus, I think your "use case" is broken by design.
>
FYI: This use case is used by Go! AOP Framework and AspectMock libraries
that can mock even static methods in the classes, allowing testing legacy
code and singletons. If you are interested in how it works, then you could
look at this example: https://3v4l.org/TbS5V