PHPUnit Setup and First Test
Install PHPUnit via Composer and write your first test class.
What is PHPUnit?
PHPUnit is PHPs standard unit testing framework. It lets you write automated tests that verify individual units of code in isolation.
Installing PHPUnit
Install via Composer as a dev dependency.
$ composer require --dev phpunit/phpunit "^11.0"All lessons in this course
- PHPUnit Setup and First Test
- Assertions and Test Methods
- Data Providers for Parameterized Tests
- Mocking Dependencies with PHPUnit