PHPUnit 5.2 requires PHP 5.6; using the latest version of PHP is highly recommended.
PHPUnit also requires the pcre, reflection, 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 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.
0 Comments:
Post a Comment