1. Installing PHPUnit

Requirements

PHPUnit 5.2 requires PHP 5.6; using the latest version of PHP is highly recommended.
PHPUnit requires the dom and json extensions, which are normally enabled by default.
PHPUnit also requires the pcrereflection, and spl extensions. These standard extensions are enabled by default and cannot be disabled without patching PHP's build system and/or C sources.
The code coverage report feature requires the Xdebug (2.2.1 or later) and tokenizer extensions. Generating XML reports requires the xmlwriter extension.

PHP Archive (PHAR)

The easiest way to obtain PHPUnit is to download a PHP Archive (PHAR) that has all required (as well as some optional) dependencies of PHPUnit bundled in a single file.
The phar extension is required for using PHP Archives (PHAR).
The openssl extension is required for using the --self-update feature of the PHAR.
If the Suhosin extension is enabled, you need to allow execution of PHARs in your php.ini:
suhosin.executor.include.whitelist = pharTo globally install the PHAR:
$ wget https://phar.phpunit.de/phpunit.phar
$ chmod +x phpunit.phar
$ sudo mv phpunit.phar /usr/local/bin/phpunit
$ phpunit --version
PHPUnit x.y.z by Sebastian Bergmann and contributors.
You may also use the downloaded PHAR file directly:
$ wget https://phar.phpunit.de/phpunit.phar
$ php phpunit.phar --version
PHPUnit x.y.z by Sebastian Bergmann and contributors.
If you liked this article

Let's subscribe the updates of Scuti!
Share on Google Plus

About Anonymous

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 Comments:

Post a Comment