Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (25 sloc) 1.14 KB
In order to run the automated tests, first you must have intall PHPUnit
( This can be easily achieved using the pear command:
pear channel-discover
pear channel-discover
pear install --alldeps phpunit/PHPUnit
On some operating systems, you may need to log in as root to execute the last
sudo pear install --alldeps phpunit/PHPUnit
Next, cd to the "tests" directory and execute phpunit inside that directory:
phpunit HelloWorldTest
The resulted output should look similar to this:
PHPUnit 3.4.11 by Sebastian Bergmann.
Time: 0 seconds, Memory: 8.50Mb
There was 1 failure:
1) HelloWorldTest::failingTest
Failed asserting that <boolean:false> is true.
Tests: 2, Assertions: 2, Failures: 1.
Generating code coverage report, this may take a moment.
The phpunit command will auto-magically read the phpunit.xml file which can be
found in the tests directory and execute the tests accordingly to those
If you're able to run the tests, then you're ready for real development.