User Guide > Tutorials > Testing Your Code Using PHPUnit

Testing your Code Using PHPUnit

This tutorial demonstrates how to create and run PHPUnit tests on your code. You will learn how to create and run single unit test cases and test suites containing a number of test cases.

Unit testing is a procedure to test your code to ensure that individual units of source code are working properly and that the right output is being generated. Tests can be run on all or some functions within files, meaning that tests can be conducted before the file has been fully developed. Each test case should be independent of others to ensure that test results can pinpoint the location of the error.

Running unit tests can ensure that your code is stable and functioning correctly, and can help you to diagnose errors.

Tutorial Content

In this tutorial, you will learn:

Provides Items

Prerequisites

Related Media

To better understand the procedures described in this tutorial, watch this video:

 

 

Related Links:

Using PHPUnit Testing

PHPUnit Preferences

 

 

©1999-2013 Zend Technologies LTD. All rights reserved.