"PHP Testing" was retired on June 24, 2019. You are now viewing the recommended replacement.
- PHP
- Intermediate
About this Course
For all us imperfect programmers, I have some great news. There are tools that can help you keep those mistakes from breaking your application. They can also help you find and fix bugs faster, while at the same time, preventing those bugs from ever coming back. Many of these tools revolve around testing.
What you'll learn
- Unit Testing
- PHPUnit
- Test Driven Development
- Code Coverage
- Test Doubles
Introduction to Unit Testing
Is the foundation of our testing would. Unit tests are written to verify that individual modules, these small units of code, are functioning the way that you expect. They do NOT talk to outside components such as a database or API. If you're familiar with Interfaces, it's kind of the same idea. If we pass the correct information, we should get back the expected results.
6 stepsTest Driven Development
When you start learning about testing, you very quickly start hearing about a practice known as Test-Driven Development, or TDD. It's the practice of: write a test for a small module (or unit) of code as if it worked already. Write the code until the tests pass. Repeat until you have tests for every unit of code you have written.
9 stepsTesting Existing Projects
We don't always have the option to build things perfectly the first time, and we're always learning, so that perfect way is going to change. A great thing about PHPUnit is its wide adoption. Almost every framework comes shipped with PHPUnit or allows for easy integration. You can also add PHPUnit as a separate package for any object-oriented application.
9 stepsTeacher
-
Alena Holligan
After starting out in fine art and moving into graphic design, Alena found her passion for programming over 15 years ago and has never looked back. Alena enjoys community and is excited to introduce people to the wonderful world of PHP and the Portland Tech Community.
When not at her computer, Alena enjoys exploring Portland with her friends and family, including her 3 young children. She also enjoys the Symphony, Cooking, Books, Yarn and Yoga.