Install phpunit in Windows

Source: Internet
Author: User
Phpunitpear installation in Windows: & nbsp; This installation method relies on PEAR, which is provided by the php installation package, the required php version must be later than php4.3.0. To install phpunit in this way, you must first install phpunit in the local Pear environment.
Pear installation:
This installation method relies on PEAR. pear is provided by the php installation package, and the required php version must be later than php 4.3.0.
To install phpunit in this way, you must first register the Pear (pilot) channel on which phpunit depends in the local pear environment. phpunit mainly depends on the following channels:
Pear channel-discover pear.phpunit.de
Pear channel-discover components. ez. no
Pear channel-discover pear.symfony-project.com
After registering the above channel, you can use the following command to install phpunit to your php environment :)
Pear install phpunit/PHPUnit
If the installation fails, update the pear version. the command is pear upgrade-all.
Manual installation:

Although using the PEAR Installer is the only supported way to install PHPUnit, you can install PHPUnit manually. For manual installation, do the following:
1. Download a release archive from http://pear.phpunit.de/get/ and extract it to a directory that is listed in the include_path of your php. ini configuration file.


2. Prepare the phpunit script:
A) Rename the phpunit. php script to phpunit.
B) Replace the @ php_bin @ string in it with the path to your PHP command-line interpreter (usually/usr/bin/php ).
C), Copy it to a directory that is in your path and make it executable (chmod + x phpunit ).
3. Prepare the PHPUnit/Util/PHP. php script:
A) Replace the @ php_bin @ string in it with the path to your PHP command-line interpreter (usually/usr/bin/php ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.