My favorites | Sign in
Project Logo
    
Show all Featured wiki pages:
Documentation
People details
Project owners:
  izimobil

Important

Testing_DocTest is now an offcial PEAR package and has moved to the PEAR packages repository, please report bugs to the PEAR bug tracker.

Introduction

Testing_DocTest allows the developer to write unit tests directly in the

 blocs of your PHP functions, classes and class methods. 

It comes with a default runner that will parse all your

 blocs and will run the extracted tests, running tests is as simple as: 

$ phpdt /path/to/your/code

There are several advantages in using Testing_DocTest:

  • it makes unit tests writing funnier, easier and quicker (there's no infrastructure to setup, you just install the package, write your code examples tests and you're done !);
  • it ensures that docstrings are up-to-date by verifying that all examples work as documented;
  • it enforces writing of tutorial documentation, liberally illustrated with input-output examples.

Installation

Just run:

$ pear install -f Testing_DocTest

And to uninstall:

$ pear uninstall Testing_DocTest

Documentation

Examples









Hosted by Google Code