如何在Windows 07 64位上使用composer安装PHPUnit? [英] How to install PHPUnit using composer in Windows 07 64 bit?
问题描述
我有Windows 07 64位操作系统,已经下载了作曲家,并且正在运行wampserver wampserver2.2e-php5.3.13-httpd2.2.22-mysql5.5.24-x64.exe.我曾尝试使用composer安装PHPUnit,但未能成功.我在Linux/Mac OS上找到了安装步骤,但在Windows中却找不到.一些站点建议将对phpunit/phpunit的依赖项添加到php项目的composer.json文件中.但是如何?我不知道. 请帮助我在wampserver(Windows 07-64位操作系统)或任何替代产品上使用composer安装PHPUnit.
I have windows 07 64-bit OS and I have downloaded the composer as well as I am running wampserver wampserver2.2e-php5.3.13-httpd2.2.22-mysql5.5.24-x64.exe . I have tried to install PHPUnit using composer but couldn't. I found the installation steps on linux/ mac os but not in windows. Some site suggested to add a dependency on phpunit/phpunit to the php project's composer.json file. But how? I don't know. Please help me for the installation of PHPUnit using composer on wampserver(windows 07-64 bit OS) or any alternatives..
推荐答案
您执行的操作与在Linux或OSX上执行的操作完全相同.
You do the exact same thing you would do on Linux or OSX.
从文档开始: http://www.phpunit.de/manual/current/en/installation.html#installation.composer
.
{
"require-dev": {
"phpunit/phpunit": "3.7.*"
}
}
并运行php composer.phar install --dev
.
要在系统范围内进行安装,请执行以下操作:
For a system wide install you do:
{
"name": "phpunit",
"description": "PHPUnit",
"require": {
"phpunit/phpunit": "3.7.*"
},
"config": {
"bin-dir": "C:/my/dir"
}
}
并将目录添加到Windows $PATH
.
and add the directory to your windows $PATH
.
这篇关于如何在Windows 07 64位上使用composer安装PHPUnit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!