More Information
  • How to install PHPUnit and confi gure IDEs for PHPUnit support
  • What are unit tests and why to test code
  • Write test doubles and learn how to replace dependencies
  • Explore how to test legacy code
  • Test code calling APIs and connecting to the database
  • Run functional tests in a web browser using Selenium tests
  • Use tests as part of the continuous integration process
  • Discover the alternatives to PHPUnit
  • Use PHPUnit tests in the Jenkins and Travis CI servers

The ability to write unit tests and software testing have become skills that every PHP developer should master.

This book is a practical guide to PHPUnit and unit testing, covering all aspects of writing PHPUnit tests and using them. The book shows why testable code is better code and how to write good tests with the help of simple and easy-to-understand examples.

With this book, you will learn how to write, organize, and execute effective tests. Step-by-step techniques of how to write testable code, how to refactor the code, and how to run your tests are shown. You will also learn about advanced testing techniques, including how to test databases, APIs, and legacy code. PHPUnit Essentials is a guide for PHP developers who want to learn or improve their software testing skills. It is a book for developers who begin with testing but is also a good source of information for developers who are already familiar with PHPUnit.

  • Learn how to install PHPUnit as well as how to write and execute tests
  • Understand the advanced concepts of testing using test doubles and the continuous integration process
  • A hands-on, step-by-step guide full of real-life examples to help you learn quickly and effectively
Page Count 314
Course Length 9 hours 25 minutes
ISBN 9781783283439
Date Of Publication 26 May 2014


Zdenek Machek

Zdenek Machek is an experienced PHP developer, who has been working with PHP since the year 2000 and PHP3 days. He introduced software testing and PHPUnit to various companies, and used them on various small as well as large scale projects.

Zdenek wrote several articles and blog posts focused on Continuous Integration processes during PHP application development.

Currently, Zdenek leads technology standards and values across the organization, and also handles analysis, planning, and technical delivery of large scale, critical, and high performance systems for our most complex projects.