sudo su -
Please change this path (/usr/local/bin) to one is appropriate for your environment.
cd /usr/local/bin
wget http://getcomposer.org/composer.phar
Please have the latest version to check bellow link for PHPUnit.
https://packagist.org/packages/phpunit/phpunit
vim composer.json
- composer.json
{
"name": "phpunit",
"description": "PHPUnit",
"require": {
"phpunit/phpunit": "4.6.6"
},
"config": {
"vendor-dir": "PHPUnit"
}
}
php composer.phar install
/usr/local/bin/PHPUnit/phpunit/phpunit/phpunit --version
PHPUnit 4.6.6 by Sebastian Bergmann and contributors.
create shell for phpunit.
- phpunit.sh
#!/bin/sh
/usr/local/bin/PHPUnit/phpunit/phpunit/phpunit $1 $2 $3
- ex )
sh phpunit.sh --version