Jared Williams schrieb: > I think they end up using the dependency injection pattern.
Of course you can argue that the code was badly {designed|written} in the example I showed and should be refactored before testing. More often than not, though, you cannot do this (3rd party code, for example) and then you cannot use mock objects without class posing. -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php