Testing HTTP SDKs in Golang

How do you test code that integrates with a third party HTTP service? The Philosophical Answer If you think about it, it is not an easy question to answer. Maybe you have already some strong opinions formed about it. But, in my experience, answers to this question differ greatly among developers, even between seasoned ones. I believe those differences are due to some preconceived ideas or different definitions about what testing is.
Read more →

Unit-testing the filesystem in PHP

I used to be a big fan of filesystem abstractions, not only for the abstraction benefit, but also for the testing benefit as well. It is trivial to unit test classes depending in filesystem abstractions like Flysystem or Gaufrette: just a simple mock of the interface and we are done. However, from time to time I was kinda annoyed with some limitations of the abstractions, specially in regards to stream handling.
Read more →