O'Reilly logo

PHP in Action: Objects, Design, Agility by Chris Shiflett, Marcus Baker, Dagfinn Reiersol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Tools and tips for testing

A.1 The basics 493
A.2 Organizing tests in a directory structure 495
A.3 PHPUnit and SimpleTest assertions 496
A.4 SimpleTest web test API 498

The testing chapters in this book primarily deal with the process, principles, and logic of testing. Therefore, we’ve saved some juicy details for dessert, focusing on how to do specific things in the two most popular unit testing frameworks, SimpleTest and PHPUnit.

A.1. The basics

Basic examples of how to use SimpleTest and PHPUnit are available elsewhere, but just to make sure we get the mechanical aspects right and don’t get bogged down in some stupid error situation, we’ll do an ultra-simple example that is neither conceptually challenging nor useful. We’ll ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required