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...

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.