Re: Class Posing
| From: | Gregory Beaver | Date: | Wed, 03 Oct 2007 23:08:15 +0000 |
| Subject: | Re: Class Posing | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32622@lists.php.net to get a copy of this message | ||
Johannes Schlüter wrote:
> The only need I see is mocking objects for a unit test. This is usually
> done on a test system so installing such an extension shouldn't be to
> hard (especially for somebody who is able to do unit tests using mock
> objects...)
This is unnecessary in a well-designed project. Rather than directly
instantiating, encapsulate the object creation in a method, then
override the method that does the creation in a mock object. No code
mods and certainly no engine mods are needed to test properly.
The feature is neat, but not a good candidate for core as proposed imo.
Greg