Qafoo GmbH - passion for software quality

Like your software, your team's training needs are unique. Use the ideas below to create a training course that best fits your team's requirements, and we'll take care of the rest.

Testing and Refactoring Legacy Code

This workshop introduces techniques for testing and refactoring legacy code. Dealing with legacy code is a frequent task for developers. To reduce the risk of introducing new bugs while working on legacy code, learning the techniques is an essential ingredient to increasing productivity. After the workshop you should be able to work with legacy code more effectivly.


Topics covered in this course block include:

  • Discussion of Legacy Code Problems
    • Static Dependencies

    • Global State

    • Mutability of State

    • Missing Abstractions

  • Testing Legacy Code
    • From the Outside with Behat

    • From the Inside with PHPUnit

  • Refactoring
    • Breaking up Dependencies

    • Branch by Abstraction

    • Extract Method/Class/Package

Length: 1 day


  • Basic Knowledge of PHPUnit or Behat

Related course blocks: