Skip to Main Content
Pro PHP MVC
book

Pro PHP MVC

by Chris Pitt
October 2012
Beginner to intermediate content levelBeginner to intermediate
500 pages
10h 29m
English
Apress
Content preview from Pro PHP MVC

CHAPTER 33

Images

CakePHP: Testing

Similar to the testing we did in Zend Framework, CakePHP’s unit tests depend on PHPUnit, making it an easy end to our time in CakePHP.

Goals

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

Testing

There are a few simple tests that we can create in order to validate the functionality of our CakePHP controllers. Because the majority of code we have written in CakePHP concerns the controller, we will only write tests for some of the actions in the UsersController.

CakePHP unit tests need to be placed n the ~/app/Test/ directory, and the first set of tests that we will create are shown in Listing 33-1 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro PHP Programming

Pro PHP Programming

Peter MacIntyre, Brian Danchilla, Mladen Gogala
Ajax Design Patterns

Ajax Design Patterns

Michael Mahemoff

Publisher Resources

ISBN: 9781430241645Purchase book