Introduction

This directory contains unit tests for PhpWiki. You must have PEAR's PHPUnit package. These tests are unrelated to maketest.pl in the directory above this one, which do not use PHPUnit.

Prerequisites

PHP

You need the php command-line interface. It was experimental as of PHP 4.2.0, default as of PHP 4.3.0. You also need the 'pear' executable.

PHPUnit

You can use pear to see if PHPUnit is installed:
/export/scratch/apache/2.0.46/php/bin) % ./pear list
Installed packages:
===================
Package        Version State
Archive_Tar    0.9     stable
Console_Getopt 1.0     stable
DB             1.3     stable
HTTP           1.2     stable
HTTP_Upload    0.8.1   stable
Mail           1.0.1   stable
Net_SMTP       1.0     stable
Net_Socket     1.0.1   stable
PEAR           1.1     stable
PHPUnit        1.0.0   stable
XML_Parser     1.0.1   stable
XML_RPC        1.0.4   stable
If it is not installed, you can use 'pear' to install it:
/export/scratch/apache/2.0.46/php/bin) % ./pear install PHPUnit

Running these unit tests

You must be in the phpwiki/tests/unit subdirectory. Then use the php command-line executable to run the tests. For example:
phpwiki/tests/unit % php test.php
Run tests ..
TestCase inlineparsertest->testnowikiwords() passed
TestCase inlineparsertest->testwikiword() passed