Files
yii2/tests
Carsten Brandt 7939a3dec5 Merge branch 'master' into array-attribute-relations
* master:
  Update output-data-widgets.md
  Fixes #4370: fileinfo extension is required for FileValidator.
  Fixes #4342
  Fixes #3887
  minor refactoring of FileValidator.
  Doc translate for rest-resources
  Better fix for Dropdown container options
  #4388: CORS filter fixes:
  Fixed test break.
  #4310: Removed `$data` from signature of `yii\rbac\ManagerInterface`
  Update .travis.yml
  Update ActiveRecordInterface.php
  Fixes #4384.
  Sphinx distributed indexes support provided
  typo fix [skip ci]
  Fixes #3611: Refactored query caching.
2014-07-23 01:43:03 +02:00
..
2013-10-28 15:48:57 +01:00

Yii 2.0 Unit tests

DIRECTORY STRUCTURE

  unit/                Unit tests to run with PHPUnit
      data/            models, config and other test data
          config.php   this file contains configuration for database and caching backends
      framework/       the framework unit tests
      runtime/         the application runtime dir for the yii test app
  web/                 webapp for functional testing

HOW TO RUN THE TESTS

Make sure you have PHPUnit installed.

Run PHPUnit in the yii repo base directory.

phpunit

You can run tests for specific groups only:

phpunit --group=mysql,base,i18n

You can get a list of available groups via phpunit --list-groups.

TEST CONFIGURATION

PHPUnit configuration is in phpunit.xml.dist in repository root folder. You can create your own phpunit.xml to override dist config.

Database and other backend system configuration can be found in unit/data/config.php adjust them to your needs to allow testing databases and caching in your environment.