PHPUnit using the tutorial--php environment variables +x-debug+composer+phpunit configuration installation (Super detail!) )

Source: Internet
Author: User
Tags composer install

First, advance into the pit point: requirements php5.6,7.0,7.1, regardless of the use of integrated or non-integrated version of the small partners to look at their PHP version, the individual version is actually 5.5.X, crying haw. But don't worry, Dad teaches you to upgrade! Please refer to:

http://blog.csdn.net/l_yangliu/article/details/52947548
php:http://windows.php.net/download/

(Thump thump thump thump thump! Note Php-versin Check to see if your PHP installation is ready! )

Ii. Preparatory work:

1. Configure PHP Environment variables-Similar to Java Configuration environment variables (ref.: https://jingyan.baidu.com/article/f00622283dd0c5fbd3f0c893.html)

2, configure PHP global variables, installation phpunit and other references:

Https://phpunit.de/manual/5.7/zh_cn/installation.html#installation.phar.windows

Https://www.cnblogs.com/IT--Loding/p/6222147.html

3, install X-debug (already equipped with a small partner X-debug if the PHP version like just the same upgrade remember to put the x-debug in the php.ini file reconfigure again Oh ~, Tai Hang Tai Hang! There's Wood there! Reference):

Http://www.cnblogs.com/baocheng/p/5775938.html

http://blog.csdn.net/l1028386804/article/details/51655507

4, installation composer:

http://blog.csdn.net/iloveyougirls/article/details/52333597

Third, warm tips:

1. If the system is a Windows Home Edition, it is recommended that the CMD command line be operated under administrator privileges when configuring the environment.

2, remember to open the php.ini configuration file inside the x-debug extension!!!

3, Composer.cmd A flash past is installed, not flash back

4, preparation work The second step, the download of the Phpuint file name is changed to Phpunit-5.7.phar, the subsequent execution of the shell script is involved in this file name, because the shell script file name and download the file name is different, so to maintain consistency
, you can change the file name to Phpunit.phar, or the shell script to the downloaded file name

5, PHPUnit only support 5.6,7.0,7.1 version, because I use the Wamp integrated version of PHP version 5.5.12, need to install more than one php5.6 version, tutorial: http://blog.csdn.net/l_yangliu/ article/details/52947548
php:http://windows.php.net/download/.

After the new PHP version is configured, use PHPUnit to change the PHP directory that points to the original version to the new version.

6. Waiting to be discovered ...

Iv. examples

1, Https://www.jianshu.com/p/ba6829a6f3ec

2, the following operations are [necessary to prepare the configuration] under the premise of operation-here to test whether the road is open

3. Download & Unzip As above example, use CMD to enter the folder of example, execute "composer install" command (no quotation marks), patiently wait for installation to depend on?

3.1-Add, first a simple look at the URL of the example code is what it means, look at the directory structure, understanding digestion. See "Execute Test" where it can be done.

4, if no error (just contact composer, also do not know how to success--)

4.1-Add, if successful, you should see the install information on the CMD console and automatically generate the Vendor folder and composer.lock the file in the root directory of the example

5, then cmd into the root directory of the example run "PHPUnit--bootstrap vendor/autoload.php tests/eventtest.php", if no accident, should be able to see similar results.

5.1-Add, if run successfully, see the CMD and the test results on the Web page similar, look at the example root directory will find more reports directory, which has the analysis results of the test data page file. How to watch the results await further research.
5.2-Error supplement, run the above command reported date () function errors: reported it was not safe to rely on the system ' s timezone setting ..., Solution: Modify php.ini file, find Date.timezon E Remove the previous semicolon modification to become: Date.timezone = PRC, restart the server, run cmd again.

PHPUnit using the tutorial--php environment variables +x-debug+composer+phpunit configuration installation (Super detail!) )

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.