Book Image

PhpStorm Cookbook

By : Mukund Chaudhary
Book Image

PhpStorm Cookbook

By: Mukund Chaudhary

Overview of this book

Table of Contents (16 chapters)
PhpStorm Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing PHPUnit


The discussion starts with testing because it precedes debugging in the software development life cycle. PHP provides a unit-testing system, which is known as PHPUnit.

Getting ready

If you use PHPUnit, you gain the freedom to write some code and to check some code. Yes, you read it right. You can use PHPUnit to write some program that will check the input and output of some other program. Interesting phenomenon, right?

When you can write an application (PHP code) using an application (PhpStorm), why not test the application (PHP code) with an application (PHPUnit test cases)? Since PHPUnit is just an application written in PHP, it is available in the form of a PHP Archive (PHAR). It is just a method to ship your files and folders as a whole and to make it ready to be executed.

Note

Please make sure that you have PHP interpreter installed before installing PHPUnit.

How to do it...

You can install it very easily by just downloading the PHPUnit archive (the phar file) and setting...