Noting Tim Otten's answer here which pointed to his blog post, I'd like to know the best pattern to allow injection of CiviCRM services into extension classes and other things (ie to support unit testing).
The kind of services that it would be most useful to inject are those that have external impacts or a generally slow:
- database access layer
- email system
- payment processing
I'm stuck on 4.6 for a month or two, and I'm guessing the answer will be different in 4.7, but happy for a "In 4.7..." answer.