1

System: Win7 ,64Bit

I installed yii2 with composer. And I also tried to install codeception and phpunit by composer using these commands

composer global require "phpunit/phpunit=4.3.*"
composer global require "codeception/codeception=2.0.*"
composer global require "codeception/specify=*"
composer global require "codeception/verify=*"

I also added teh phpunit to the composer.json

 "require-dev": {
    "yiisoft/yii2-codeception": "*",
    "yiisoft/yii2-debug": "*",
    "yiisoft/yii2-gii": "*",
    "yiisoft/yii2-faker": "*",
    "phpunit/phpunit": "4.3.*"
},

and added current Path to the PATH environment variable

E:\wamp\www\website\vendor\bin

But if I run

phpunit --version

or

codeception

I get the Error message "The command 'phpunit' wasn't found...

EvilKarter
  • 267
  • 7
  • 22

1 Answers1

1

I am sure that E:\wamp\www\website\vendor\bin does not contain any phpunit or codeception files. Because you have installed phpunit and codeception globally, it means that they are installed someplace else and not in the website files (and that makes sense too).

Here are some instructions on how to add composer globally in Windows Is there any way to install Composer globally on Windows?.

I do not have windows so I cannot tell you directly where things are.

Community
  • 1
  • 1
Mihai P.
  • 9,307
  • 3
  • 38
  • 49