Files
yii2/tests
Carsten Brandt bd589620d8 Merge branch 'master' into elasticsearch
* master: (59 commits)
  Refactored hasMany and hasOne so that they support cross-DBMS relationship.
  removed unused asset.php files
  fixed composer.json autoload pathes
  fixed c&p error
  allow installing yii2-dev and get the Yii.php file in the same place
  updated dev composer.json dependencies
  added composer.json for yii2-dev package
  fixed broken UniqueValidator
  removed call to nonexistsend property
  cleanup redis AR
  refactored Model and redis AR to allow drop of RecordSchema
  refactored redis AR to relect the latest changes
  "yii\swiftmailer\Mailer::createSwiftObject()" simplified.
  fixed empty result in findByPk list
  fixed problem with not closed transaction in deleteAll()
  fixed broken test
  apply changes to db\AR -> redis\AR
  added dependency in db\AR -> redis\AR needs to be refactored later
  redis AR cleanup
  ensure atomicity of operations
  ...

Conflicts:
	tests/unit/data/config.php
2013-11-23 03:02:35 +01:00
..
2013-10-18 20:52:38 +04: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.