From e7ce2ce70967af96ffe720a4b03e5a4d8afc98eb Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Thu, 4 Jun 2015 17:33:05 +0300 Subject: [PATCH] Note about Codeception local installation added --- docs/guide/test-environment-setup.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/guide/test-environment-setup.md b/docs/guide/test-environment-setup.md index 7568ed308c..0942c4a394 100644 --- a/docs/guide/test-environment-setup.md +++ b/docs/guide/test-environment-setup.md @@ -14,8 +14,18 @@ Yii provides ready to use test sets for all three test types in both [`yii2-basic`](https://github.com/yiisoft/yii2/tree/master/apps/basic) and [`yii2-advanced`](https://github.com/yiisoft/yii2/tree/master/apps/advanced) project templates. -In order to run tests you need to install [Codeception](https://github.com/Codeception/Codeception). A good way to -install it is the following: +In order to run tests you need to install [Codeception](https://github.com/Codeception/Codeception). +You can install it either locally - for particular project only, or globally - for your development machine. + +For the local installation use following commands: + +``` +composer require "codeception/codeception=2.0.*" +composer require "codeception/specify=*" +composer require "codeception/verify=*" +``` + +For the global installation you will need to use `global` directive: ``` composer global require "codeception/codeception=2.0.*" @@ -31,3 +41,9 @@ Changed current directory to Then add `/vendor/bin` to you `PATH` environment variable. Now we're able to use `codecept` from command line globally. + +> Note: global installation allows you use Codeception for all projects you are working on your development machine and + allows running `codecept` shell command globally without specifying path. However, such approach may be inappropriate, + for example, if 2 different projects require different versions of Codeception installed. + For the simplicity all shell commands related to the tests running around this guide are written assuming Codeception + has been installed globally.