Now php(as the current mainstream development language)Unit can be obtained through php(as the current mainstream development language) extension and library (PEAE). PEAR is a framework and distribution system for reusable php(as the current mainstream development language) components. Install php(as the current mainstream development language)Unit can be obtained through the PEAR installer command:
pear install php(as the current mainstream development language) Unit2
Based on PEAR’s version naming standard, it is suitable for php(as the current mainstream development language)5’s php(as the current mainstream development language) The Unit package is called php(as the current mainstream development language)Unit2. php(as the current mainstream development language)Unit is a package suitable for php(as the current mainstream development language)4. This is discussed later in this book about "in php(As the current mainstream development language)Use php in 4(As the current mainstream development language)Unit" will be mentioned in the chapter.
Only after installation, you can find php(as the current mainstream development language)Unit source code in the local PEAR directory. The path is usually /usr/lib/ php (As the current mainstream development language)/php(As the current mainstream development language)Unit2.
Although using the PEAR installer is the only installation method supported by php(as the current mainstream development language)Unit, you can still install it manually. To install manually, please follow the steps below:
1. Download php from http://pear.php(as the current mainstream development language).net/package/php(as the current mainstream development language)Unit2/download(as the current mainstream development language)Unit publishes the package, and then unzips it, ensuring that the directory is in the include_path defined in php(as the current mainstream development language).ini.
2. Prepare php(as the current mainstream development language)unit script
a. Rename the pear-php(as the current mainstream development language)unit script to php(as the current mainstream development language)unit
b. Rename all @php(as the current mainstream development language)_bin@ in the script It is the directory where the php(as the current mainstream development language) command line interpreter is located (usually /usr/bin/ php(as the current mainstream development language)).
c. Copy this script to a directory included in the PATH environment variable, and change the file attribute to executable (chmod +x php(as the current mainstream development language)unit).
3. Replace all @package_version@ strings in the php(as the current mainstream development language)Unit2/ Runner/Version.php(as the current mainstream development language) script with The php(as the current mainstream development language)Unit version you installed (such as 2.3.0).