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.

Rated 4

Anonymous at 12:20 on 14 May 2011

some interesting ideas on how to mock certain parts to make an app testable

very good overview of what you can do. also very keen on the dea of generative programming.

A lot of 'nasty' ideas on how to do something otherwise impossible.
Terribly useful for those condemned to upgrade bad software

Rated 5

Anonymous at 15:36 on 15 May 2011

Great tricks! Every PHP developer should know.

Wonderful tricks, some were simply things that we needed to see in a different perspective.
Enlightening

nice and clear presentation, solid concepts, useful tips