Zend Framework: Testing

We end our time with Zend Framework by looking at how to run unit tests in our application, using PHPUnit.


  • We need to learn how to install PEAR and PHPUnit.
  • We need to learn how to create and run tests on our controllers.

Installing PEAR

PEAR is the official distribution platform for reusable PHP libraries. You can think of it like Homebrew except instead of distributing packages that work with OS X, it distributes libraries tailored for use with PHP. You can install PEAR in just a few steps, which we will detail next.


  • After you have downloaded and installed PHP, you must manually execute ...

Get Pro PHP MVC now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.