Environment: Ubuntu12.04 + PHP5.3 (for compilation and installation, refer to this article for the compilation and installation steps). Note that PHPUnit3.7 requires PHP5.3.3 (or a later version). We strongly recommend PHP5.5.1 (or a later version ).
Clearing the pear cache helps, also in summary:
A) text_template has to be uninstalled before mock_object which it depends on
B) token_stream also has to be uninstalled as version 1.0.1 has to be installed before code_coverage which instils 1.1.1
Phpunitpear installation in Windows: & nbsp; This installation method relies on PEAR, which is provided by the php installation package, the required php version must be later than php4.3.0. To install phpunit in this way, you must first install
Install PHPUnit under Windows
Pear Mode Installation:
This installation depends on the pear,pear is provided by the PHP installation package, and the required PHP version must be PHP 4.3.0 later.
To install PHPUnit in this way, you must first
16:45 2015/12/8PHPUnit Test Learning 1: A simple summary of useful things a little introduction to understandingFor specific introductory installation and introductory practices, please refer to the recommended blog or other online blogRecommended
1. Install ubuntu 12.04
wget https://phar.phpunit.de/phpunit.pharchmod +x phpunit.pharmv phpunit.phar /usr/local/bin/phpunit
2. Test Case phpunit1.php test dependency)
Demonstrate how to use @ depends annotation to express dependencies between test
Example 4.1 shows how to write a test with PHPUnit to test the PHP array operation. This example introduces the basic practices and procedures for writing tests with PHPUnit:
Tests for class classes are written in class Classtest.
Classtest (usually)
Install PEAR in WINDOWS and PEAR in WINDOWS. Install PEAR in WINDOWS, WINDOWS install PEAR 1, download the go-pear.phar file from the official website, address pear. php. netgo-pear.phar put the downloaded file go-pear.phar in the PHP installation
Install PEAR in WINDOWS and install PEAR in WINDOWS
1. Download go-pear.phar files from the official website, address http://pear.php.net/go-pear.phar
Put the downloaded file go-pear.phar to the PHP installation directory, dos command to enter the
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.