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...