Fixed version constraints, adjusted readme, fixed formatting

This commit is contained in:
Alexander Makarov 2016-07-25 23:41:30 +03:00
parent c8c49a8146
commit d7df546502
3 changed files with 34 additions and 24 deletions

View File

@ -106,21 +106,32 @@ return [
TESTING TESTING
------- -------
Tests are located in `tests` directory, developed with [Codeception PHP Testing Framework](http://codeception.com/). Tests are located in `tests` directory. They are developed with [Codeception PHP Testing Framework](http://codeception.com/).
By default there are 3 test suites: `unit`, `functional` and `acceptance`. Tests can be executed by running By default there are 3 test suites:
- `unit`
- `functional`
- `acceptance`
Tests can be executed by running
``` ```
composer exec codecept run composer exec codecept run
``` ```
This will execute unit and functional tests. Unit tests are testing the system components, while functional tests are for testing user interaction. The command above will execute unit and functional tests. Unit tests are testing the system components, while functional
Acceptance tests are disabled by default as they require additional setup as they perform testing in real browser. tests are for testing user interaction. Acceptance tests are disabled by default as they require additional setup since
they perform testing in real browser.
### Running acceptance tests
To execute acceptance tests do the following: To execute acceptance tests do the following:
1. Rename `tests/acceptance.suite.yml.example` to `tests/acceptance.suite.yml` to enable suite configuration 1. Rename `tests/acceptance.suite.yml.example` to `tests/acceptance.suite.yml` to enable suite configuration
2. Replace `codeception/base` package in `composer.json` with `codeception/codeception` to install full featured version of Codeception. 2. Replace `codeception/base` package in `composer.json` with `codeception/codeception` to install full featured
version of Codeception
3. Update dependencies with Composer 3. Update dependencies with Composer
@ -162,8 +173,7 @@ To execute acceptance tests do the following:
composer exec codecept run unit,functional composer exec codecept run unit,functional
``` ```
Code coverage support ### Code coverage support
---------------------
By default, code coverage is disabled in `codeception.yml` configuration file, you should uncomment needed rows to be able By default, code coverage is disabled in `codeception.yml` configuration file, you should uncomment needed rows to be able
to collect code coverage. You can run your tests and collect coverage with the following command: to collect code coverage. You can run your tests and collect coverage with the following command:

View File

@ -12,7 +12,7 @@
"irc": "irc://irc.freenode.net/yii", "irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2" "source": "https://github.com/yiisoft/yii2"
}, },
"minimum-stability": "stable", "minimum-stability": "dev",
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.5", "yiisoft/yii2": ">=2.0.5",
@ -21,11 +21,11 @@
}, },
"require-dev": { "require-dev": {
"codeception/base": "^2.2.3", "codeception/base": "^2.2.3",
"codeception/verify": "*", "codeception/verify": "~0.3.1",
"yiisoft/yii2-debug": "*", "yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*", "yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*", "yiisoft/yii2-faker": "*",
"codeception/specify": "*" "codeception/specify": "~0.4.3"
}, },
"config": { "config": {
"process-timeout": 1800 "process-timeout": 1800