Originally posted on: http://geekswithblogs.net/swisscoder/archive/2013/07/03/clean-code-talks-by-misko-hevery---part-2-unit.aspx
He says something brilliant:
There is no secret to writing tests...
... there are only secrets to writing testable code!
Unit Tests require a separation of instantiation of the object graph from the business logic.
- do not use new(...) in the business logic. Use Factories.
- do not use global variables/state
- no static methods