-
Notifications
You must be signed in to change notification settings - Fork 0
OSS PHP Frameworks Unit Testing: PHPUnit
PHPUnit is the primary PHP testing framework. It provides both a framework for writing tests easy as well as to run and analyze tests.
Note: The tests for PHPUnit is not run exactly like one would use PHPUnit to run other tests. While PHPUnit is the underlying framework, the tests are run via a wrapper script around PHPUnit.
Download the latest master branch from Github
There does not seem to be official documentation for self-testing PHPUnit. It is fairly easy to run these tests, however; the command to do so is listed below.
In order to run the PHPUnit unit tests successfully, make sure you have HHVM, Composer and other basic packages ready to go.
Some initial configuration is required for PHPUnit, particularly around dependencies.
We used composer to install the dependencies. In the root PHPUnit source code directory, you will find the composer.json
file that will be used to download the required dependencies to run the unit tests.
hhvm [path-to-composer-phar]/composer.phar install --dev
To run the PHPUnit unit tests, use the following command from the root PHPUnit directory:
`hhvm [path-to-phpunit-source-code]/phpunit.php`
phpunit.php
is a wrapper script around PHPUnit.