I think they end up using the dependency injection pattern.
http://www.picocontainer.org/ java implementation with a PHP port. http://sourceforge.net/projects/phemto/ is a more lightweight PHP implementation. Its README http://phemto.cvs.sourceforge.net/phemto/phemto/README?revision=1.1.1.1&view =markup . Problem is the cost of setting up these, by registering implementations, performing reflection and so on is expensive especially considering the stateless nature of PHP. J > -----Original Message----- > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > Sent: 02 October 2007 21:21 > To: Sebastian Bergmann > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Class Posing > > > Stubs / Mock Objects !== Unit Tests. Class Posing allows > for better > > stubs / mock objects which in turn are tools to write better unit > > tests. > > OK, I see that. The question is - does any of the known unit > test systems use mock objects? Does it do that in the > language that doesn't allow "new Foo" to create object of > entirely unrelated class? If so - how it is usually done? > -- > Stanislav Malyshev, Zend Software Architect > [EMAIL PROTECTED] http://www.zend.com/ > (408)253-8829 MSN: [EMAIL PROTECTED] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php