PHPUnit pocket guide-PHPUnit_PHP installation tutorial

Source: Internet
Author: User
PHPUnit pocket guide for installing PHPUnit. By now, php (as the mainstream development language) Unit can be obtained through php (as the mainstream development language) extension and library (PEAE. PEAR is reusable php (as the current mainstream to open this php (as the current mainstream development language) Unit can use php (as the current mainstream development language) extension and library (PEAE). PEAR is a framework and distribution system for reusable php (as the mainstream development language) components. Install php (as the mainstream development language). The Unit can be obtained through the PEAR installer command:

Pear install php (as the mainstream development language) Unit2

According to the PEAR version naming standard, it is applicable to php (as the mainstream development language) 5 (as the mainstream development language). The Unit package is called php (as the mainstream development language) unit2. Php (as the mainstream development language) Unit is applicable to php (as the mainstream development language) 4, this will be mentioned later in the chapter "using php (as the mainstream development language) 4 as the mainstream development language) Unit.

The installation is only available. you can find the source code of php (as the mainstream development language) Unit in the local PEAR directory, the path is usually/usr/lib/php (as the current mainstream development language) unit2.

Although the PEAR installer is the only installation method supported by php (as the mainstream development language) Unit, you can install it manually. To install it manually, follow these steps:

1. from http://pear.php (as the mainstream development language ). net/package/php (as the current mainstream development language) Unit2/download php (as the current mainstream development language) Unit release package, and then decompress, make sure that the directory is in php (as the mainstream development language ). in include_path defined by ini.

2. prepare php (as the mainstream development language) unit scripts

A. change the pear-php (as the mainstream development language) unit script to php (as the mainstream development language) unit

B. change all @ php in the script (as the mainstream development language) _ bin @ to php (as the mainstream development language) the directory where the command line interpreter is located (usually/usr/bin/php (as the mainstream development language )).

C. copy the script to the directory contained in a PATH environment variable and change the file attribute to executable (chmod + x php (as the mainstream development language) unit ).

3. use php (as the mainstream development language) Unit2/Runner/Version. replace all @ package_version @ strings in the php script (as the current mainstream development language) with your installed php (as the current mainstream development language) Unit version (such as 2.3.0 ).

Pipeline (as the mainstream development language) Unit can be obtained through php (as the mainstream development language) extension and library (PEAE. PEAR is reusable 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.