CHAPTER 29

Images

Zend Framework: Testing

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

Goals

  • 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.

Windows

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

Get Pro PHP MVC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.