Library PHP Tek 2025 Writing Testable Code
Writing Testable Code

Log in to watch this talk

You need to be logged in to access this video. If you don't have an account, purchase a virtual pass for the latest php[tek] conference to get access to the full video library.

Writing Testable Code

Mark Niebergall Mark Niebergall PHP Tek 2025 Intermediate (some prior knowledge necessary) Standard (50 minutes)

Having problems writing tests for code? Not sure how to start writing tests? Testable code follows specific patterns, principles, and practices to make it testable. We will cover Dependency Injection (DI), decoupling, mocking, and other code architecture techniques to make your code easier to write tests for. Common problem areas with practical solutions will be discussed, including race conditions, timing, dynamic data, databases, and external dependencies.