How to install phpUnit on Windows?

1. Install Composer-Exe from link

2. Edit/Create composer.json into C:\cygwin64\home\Administrator

3. Add below dependency to composer.json

{
“require-dev”: {
“phpunit/phpunit”: “3.7.*”
}
}

3. run cmd command -> composer install -dev, below output will ensure phpUnit installation.

composer install -dev
Loading composer repositories with package information
Installing dependencies (including require-dev)
– Installing symfony/yaml (v2.5.7)
Downloading: 100%

– Installing phpunit/php-text-template (1.2.0)
Downloading: 100%

– Installing phpunit/phpunit-mock-objects (1.2.3)
Downloading: 100%

– Installing phpunit/php-timer (1.0.5)
Downloading: 100%

– Installing phpunit/php-token-stream (1.2.2)
Downloading: 100%

– Installing phpunit/php-file-iterator (1.3.4)
Downloading: 100%

– Installing phpunit/php-code-coverage (1.2.18)
Downloading: 100%

– Installing phpunit/phpunit (3.7.38)
Downloading: 100%

phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.0.5)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s