Window, use pear to install phpunit1. install pear1) in the command line, enter the php installation directory, such as my Directory D: \ php \ Zend \ ZendServer \ bin, and run: if go-pear has the following error: phar "D: \ php \ Zend \ window, use pear to install phpunit.
1. install pear
1) in the command line, go to the php installation directory, such as my Directory D: \ php \ Zend \ ZendServer \ bin, and run:
Go-pear
If the following error occurs:
Phar "D: \ php \ Zend \ ZendServer \ bin \ PEAR \ go-pear.phar" does not have a signature
Warning: require_once (phar: // go-pear.phar/index. php): failed to open stream: pha
R error: invalid url or non-existent phar "phar: // go-pear.phar/index. php" in D :\
Php \ Zend \ ZendServer \ bin \ PEAR \ go-pear.phar on line 1236
Solution: Open the php. ini file and add phar. require_hash = Off to the last line.
4) in this case, pear should be installed successfully and updated to the latest version:
Pear upgrade-all
(This step is very important. phpunit seems to be installed using pear 1.9.x)
2. install phpunit:
1) add a phpunit Channel
Pear install phpunit/PHPUnit
If this error occurs:
Fatal error: require_once (): Failed opening required 'ures ures/Graph. php'
The solution is as follows:
Decompress and copy the Structures directory to D: \ php \ Zend \ ZendServer \ bin \ PEAR.
If:
Cocould not extract the package. xml file
Error: cannot download "phpunit/XXXX"
The path to the pear download directory may contain spaces such as: D:/program files/
The solution is as follows:
Pear config-set temp_dir "C: \ tmp"
Pear config-set download_dir "C: \ tmp"
Here, you can set the directory path without spaces. it doesn't matter where you want to set it.
Finally, test whether the installation is successful. run the following command in cmd:
Phpunit
3. integrate phpunit with zendStudio8
1) create a new project in zend studio.
2) right-click the project and select "Properties". in the displayed Properties box, select "PHP Include Path"> "Libraries"> "Add Library" and select "PHPUnit 3.x.
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.