Agreed, static functions are (in my experience) much easier to test precisely because they generally have very explicit inputs and outputs, whereas instance methods are more likely to have "implicit" inputs in the form of object state and to have side effects, often in the form of modifying object state, rather than explicit outputs. My experience is that basically the closer you get to pure functional programming, with no global state and no side effects, the easier testing is.
The item about polymorphism strikes me as bogus too. But then again, I absolutely abhor mocks, because my experience has been that the mocks end up diverging from the real production code and you end up with either tests that don't break when the app is broken or tests that break when the app isn't broken, so optimizing for mocking is a horrible idea in my book.
Composition over inheritance is generally a good idea, but it is actually useful for testability, though not for the reasons the author mentions. Deep inheritance hierarchies make things hard to test because testing a leaf class in the hierarchy naturally means you're testing every other class up the chain, making it very hard to test just the code on that leaf class. Deep hierarchies like that also usually involve some contract between the different levels that's inherently hard to test for.
The item about polymorphism strikes me as bogus too. But then again, I absolutely abhor mocks, because my experience has been that the mocks end up diverging from the real production code and you end up with either tests that don't break when the app is broken or tests that break when the app isn't broken, so optimizing for mocking is a horrible idea in my book.
Composition over inheritance is generally a good idea, but it is actually useful for testability, though not for the reasons the author mentions. Deep inheritance hierarchies make things hard to test because testing a leaf class in the hierarchy naturally means you're testing every other class up the chain, making it very hard to test just the code on that leaf class. Deep hierarchies like that also usually involve some contract between the different levels that's inherently hard to test for.