Unit Test and Refactor Legacy PHP Code
This article proposes strategies to refactor problematic PHP code, making it easier to test it with unit testing tools, while reducing dependencies that improves your code base.
This article proposes strategies to refactor problematic PHP code, making it easier to test it with unit testing tools, while reducing dependencies that improves your code base.
“Bug fixing often uncovers opportunities for refactoring. The very fact that you’re working with code that contains a bug indicates that there is a chance that it could be clearer or better structured.”
Copyright © 2009-2026 Software Testing Magazine by Martinig & Associates