How to install PHPUnit using composer in Windows 07 64 bit?

I have 64-bit Windows 07 and I downloaded composer and also run wampserver wampserver2.2e-php5.3.13-httpd2.2.22-mysql5.5.24-x64.exe. I tried installing PHPUnit using the composer but could not. I found installation steps on linux / mac os, but not windows. Some site suggested adding a dependency on phpunit / phpunit to the php project file project.json. But how? I dont know. Please help me install PHPUnit using composer on wampserver (Windows 07-64 bit OS) or any alternatives.

0
source share
2 answers

You do the same as on Linux or OSX.

As from the docs: http://www.phpunit.de/manual/current/en/installation.html#installation.composer .

 { "require-dev": { "phpunit/phpunit": "3.7.*" } } 

and run php composer.phar install --dev .

For a system installation, you:

 { "name": "phpunit", "description": "PHPUnit", "require": { "phpunit/phpunit": "3.7.*" }, "config": { "bin-dir": "C:/my/dir" } } 

and add the directory to your $PATH windows.

+13
source

In this case, I would suggest using Pear. Usually you do not install only a couple of php classes, but you may also need to configure Windows to make phpunit run as a tool.

Try looking here

+1
source

Source: https://habr.com/ru/post/1341779/


All Articles