PHP Unit test environment installation in Windows PHPUnit graphic tutorial

Source: Internet
Author: User
This article describes how to install the PHP Unit test environment PHPUnit in Windows. follow the instructions in this article to install PHPUnit in Windows, for more information, see 1. download the php zip package and configure php. ini, the example here uses E: \ php

2. add your php directory to the path of the system environment variable.

3. run cmd and switch to your php Directory. my current directory is E: \ php.

4. input go-pear.bat

First, the script will ask whether to install pear as the system range or local copy. Here we select the system by default and press enter.

5. the current path configuration is displayed, and you are asked if you want to modify it. we can press enter by default. after the press enter, the script will automatically install the pear Library.

6. during installation, the script will prompt you to set include_path in php. ini. we will set it in php. ini as required, and press enter.

7. the script will remind you to import the system variable registration file of pear, which is in your php directory.

8. press enter to complete pear installation. to test whether pear is installed, enter pear in the command line. if you see the following output, it is OK.

9. start to install PHPUnit. first, upgrade pear and enter the command

The code is as follows:


Pear upgrade pear

10. enter the following commands in sequence to add the pear channel. during addition, the system may prompt a failure due to network problems. just try it several times.

The code is as follows:


Pear channel-discover components. ez. no
Pear channel-discover pear.phpunit.de
Pear channel-discover pear.symfony-project.com

Tips:

If the following error message is prompted during adding, enable the php_openssl.dll extension in php. ini.

Unable to find the socket transport "ssl"-did you forget to enable it when you configured PHP?

11. enter the following command to start PHPUnit installation. Similarly, the installation may fail due to network problems. just try it several times.

The code is as follows:


Pear install -- alldeps -- force pear.phpunit.de/PHPUnit
Pear install pear.phpunit.de/DbUnit

12. after the command is run, PHPUnit is installed. you can enter PHPUnit to test whether the installation is successful.

If you enter the php display, your PHPUnit installation is complete.

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.