Installing the PHP Unit test environment under Windows PHPUnit Graphics and text tutorials _php Tips

Source: Internet
Author: User

1, in accordance with the general download PHP zip package and configuration good php.ini, here's an example of the use of E:\php

2. Add your PHP directory to the System environment variable path

3, start running the input cmd, and then switch to your PHP directory, my current is E:\php

4, Input Go-pear.bat

First, the script asks if you want to install pear as a system-wide or local copy, here we default to select the system, direct return to

5, this time to display the current path configuration, and ask if you modify, we keep the default still enter can be, enter the script will begin to automatically install the Pear Library

6, the installation of the script will prompt you to set the php.ini inside Include_path, we follow the requirements in the php.ini inside set up, set a good return to

7, the final script will remind you to import Pear's system variable registration file, this file is in your PHP directory

8, input carriage return, pear installation is completed, test pear is installed, you can directly in the command line input pear, if you see the following output, that is OK

9, start installation PHPUnit, first upgrade pear, enter the command

 
  
Copy Code code as follows:

Pear Upgrade Pear

10, and then enter the following command to add Pear Channel, when added may be due to network problems may be prompted to fail, try a few more

 
  
Copy Code code as follows:

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

Small tip:

If you receive the following error prompts when adding, open php_openssl.dll this extension in php.ini

Unable to find the socket transport "SSL" –did your forget to enable it when you configured PHP?

11, enter the following command to start the installation of PHPUnit, the same, installation because network problems may be prompted to fail, try several times can

 
  
Copy Code code as follows:

Pear Install--alldeps--force pear.phpunit.de/phpunit
Pear Install Pear.phpunit.de/dbunit

12, after the command is completed, PHPUnit installed, we can enter PHPUnit to test whether the installation is successful

If you enter PHP to show the image above, then your PHPUnit is installed.

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.