Home > Article > Backend Development > phpstorm configures phpunit for php unit testing
phpstorm configures phpunit to perform php interface unit testing
1. Install php5.6, phpunit5.1, curl
mac comes with the default php5.5, which needs to be upgraded. Open the terminal and run: curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6
View the phpunit official website documentation and follow the document steps
wget https://phar.phpunit.de/phpunit.phar$ chmod +x phpunit.phar$ sudo mv phpunit.phar /usr/local/bin/phpunit $ phpunit --version PHPUnit 5.1.3 by Sebastian Bergmann and contributors
2. Download the phpunit.phar file, and then load it in phpstorm, as shown in the figure
The second one is the path of phpunit.phar
3. Load the phpunit installation directory:
4. Select the compiler
5 and simulate the access interface according to curl,
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($(' ').text(i)); }; $numbering.fadeIn(1700); }); });
The above introduces phpstorm to configure phpunit and conduct php unit testing, including the content. I hope it will be helpful to friends who are interested in PHP tutorials