Testing software applications with the help of unit testing facilities is an widely-adopted standard in the software development industry today. Even the PHP community provides such tools to automate the testing of PHP applications. Unfortunately there exist legacy applications that are not testable by their internal design. Testing an single component of such an application in isolation is not possible in those cases due to their dependencies on other components. This often leads to the point of manual testing which is cost-intense and error-prone. In the first part of the session it is shown how the dynamic nature of PHP itself can be used to manipulate existing dependencies to be able to test a single component of the application on its own. In the second part of the session an additional layer of abstraction is introduced. By using that layer it is shown how to transform components of the original source code into testable code fragments.

Comments

Comments are closed.

Finally a presentation that's true to its title! I like the creative solutions cooked up here, putting php in a sandbox environment. It also helps that this is an experienced speaker.

Some really interesting stuff! Especially overloading autoload to use your mock object

Great talk. Very interesting. Right to the point, good examples and a good mix of theory of practical application. Some of the stuff presented is very cool. Makes you wanna try this stuff out at home.

It was useful to have this knowledge for future reference.

Good talk, always love some "dirty hacks" and some were real dirty, especially the overloading of the file stream wrapper and replacing code in the file :D. Too bad it was short, maybe add some more (related) topics so it fill the 45 minutes.

Too bad there are only the hacks to get things done, would be nice to have a 'proper' way. Good presentation though.

Great presentation. At the end of the conference I understood this was his first presentation at a conference (or was it the first at DPC?). That would explain the fact that he seemed a bit nervous. Nevertheless it was a very well put together presentation with insightful content.
I also appreciate the fact that the presenter wasn't afraid to show some solutions that are so ugly they should get some sort of an award.

I liked it very much, because it gave very practical insight. It also pointed me at ways to use PHP in a very flexible way that I wouldn't have thought of myself. I knew PHP is flexible, but in your hands it is flexible beyond flexible. The only limit is our imagination and still, we always have to try to look beyond that. Your presentation gives us a push in the right direction.

I had an other idea about what untestable code is, did not meet my expectations. Good speaker with clear content and real world examples for the solutions.