When making changes to your code, you want to test your application in order to validate that your (new and existing) code works as expected. Testing the same functionality manually over and over again every time you make a change will cost a lot of time. A more efficient way to test your code is to write some code to do this automatically for you, which is known as test automation. PHPUnit is the most popular test automation framework for PHP.
In this training you will be introduced to the PHPUnit testing framework and learn how to write automated tests for your PHP applications. You will learn about the different types of tests, how to write unit tests, and how to use test doubles to isolate your tests from other code. You will also learn about integration and system tests, code coverage, and how to write high-quality tests that are easy to read and maintain.
This training is aimed at developers who have experience with PHP and want to learn how to test their application code effectively using PHPUnit.
Attendees should have at least 1-2 years of experience with PHP and object-oriented programming (OOP), and be confident in using an IDE and the command line.
After completing this training, you:
- Can use PHPUnit to write automated tests
- Know about the Test Pyramid and different types of tests (unit, integration, and system tests)
- Can write unit, integration and system tests following common design patterns and best practices
- Can use test doubles (dummies, fakes, stubs, spies and mocks) to isolate unit tests from other code
Please bring a laptop with your preferred IDE and the following pre-installed software: