Since the phpunit channel was shut down in 2014, I am looking for a way to install phpunit version 3.5.x without pear. The only answers that I have found explain how to use it with composer, but version 3.5.x does not exist as a composer package.
I do have the 3.5.10 source code for PHPUnit, but I am struggling on how to install it so that I can use it as a command line tool.
PHPUnit 3.7 was the first version to support Composer and PHAR. With PHPUnit 3.5 you are out of luck.
I use phpunit 4.8.* it supports composer and is very easy to install it. Using netbeans makes it even more easy because netbeans creates tests for you.
Put the following lines in the composer.json
"require-dev": {
"phpunit/phpunit-skeleton-generator": "*",
"phpunit/phpunit": "4.8.*"
},
Now update the composer via command and it will install. Using git it will be something like this.
composer update
composer install
To get the composer.phar
curl -sS https://getcomposer.org/installer | php
Now configure phpunit and you're good to go.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.