Creating an Interface To a Language's Standard Library?
- by Nathan Arthur
In the process of learning test-driven development, I've been introduced to dependency injection and the use of interfaces, and have started using these concepts in my own PHP code in order to make it more testable.
There have been times when I've needed to test code that was doing things like calling the PHP time() function. In order to make…