Home > Backend Development > PHP Tutorial > Installing PHP unit testing environment PHPUnit graphic tutorial under Windows, _PHP tutorial

Installing PHP unit testing environment PHPUnit graphic tutorial under Windows, _PHP tutorial

WBOY
Release: 2016-07-13 10:16:04
Original
942 people have browsed it

Graphic tutorial on installing PHP unit testing environment PHPUnit under Windows,

1. Download the php zip package and configure php.ini as usual. The example here uses E:php

2. Add your php directory to the system environment variable path

3. Start running and enter cmd, and then switch to your php directory. My current one is E:php

4. Enter go-pear.bat

First the script will ask whether to install pear as system-wide or as a local copy. Here we select system by default and just press Enter

5. The current path configuration will be displayed and asked if you want to modify it. We can keep the default and press Enter. After pressing Enter, the script will start to automatically install the pear library

6. During installation, the script will prompt you to set the include_path in php.ini. We set it in php.ini as required. After setting, press Enter

7. Finally, the script will remind you to import pear’s system variable registration file. This file is in your php directory

8. Enter pear and the installation of pear is completed. To test whether pear is installed, you can directly enter pear on the command line. If you see the following output, it is ok

9. Start installing PHPUnit, first upgrade pear, enter the command

<div class="codetitle">
<span><u>复制代码</u></span> 代码如下:</div><div class="code" id="code40137">
<br>pear upgrade pear<br>
</div>
Copy after login

10. Enter the following commands in order to add pear's channel. When adding, you may be prompted to fail due to network problems. Just try a few times

<div class="codetitle">
<span><u>复制代码</u></span> 代码如下:</div><div class="code" id="code31851">
<br>pear channel-discover components.ez.no<br>pear channel-discover pear.phpunit.de<br>pear channel-discover pear.symfony-project.com<br>
</div>
Copy after login

Tips:

If the following error message appears when adding, please 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 installing PHPUnit. Similarly, the installation may fail due to network problems. Just try a few times

<div class="codetitle">
<span><u>复制代码</u></span> 代码如下:</div><div class="code" id="code9825">
<br>pear install --alldeps --force pear.phpunit.de/PHPUnit<br>pear install pear.phpunit.de/DbUnit<br>
</div>
Copy after login

12. After the command is completed, PHPUnit will be installed. We can test whether the installation is successful by entering PHPUnit

If you enter php and the above picture appears, then your PHPUnit installation is complete.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/899061.htmlTechArticleInstalling the PHP unit testing environment PHPUnit graphic tutorial under Windows, 1. Download the php zip package and configure it as usual php.ini, the example here uses E:php 2. Add your php directory...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template