O'Reilly logo

PHPUnit Essentials by Zdenek Machek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Installing PHPUnit

To be able to write and run PHPUnit tests, PHPUnit has to be installed on the machine. With the right approach, it is not difficult; however, in the past, this was a bit of an issue for many users because they were struggling with the right settings and all of the dependencies that needed to be installed.

Until recently, the recommended installation method for PHPUnit was by using PEAR; however, from PHPUnit 3.7 onwards, there is an option available to use Composer. Composer is a tool for dependency management in PHP, which makes PHP tools or libraries' installations much easier. There are a few more options to install PHPUnit, and this chapter describes them step by step.

Apart from what is required for PHPUnit installation, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required