Files
Brandon Kelly 7a37c47bb2 Fixed #7150 - support ICU single quote syntaxes
- When converting an ICU date/time format to PHP, text within single quotes will be replaced with backslashes in front of each character (the PHP date() method for escaping text), and double-single quotes will be replaced with single quotes.
- When converting an ICU date/time format to jQuery UI, text  within single quotes, and double-single quotes, will each be preserved (rather than parsed for date/time format symbols), as jQuery UI uses the same text escaping and single quote syntax as ICU.
- Add support for '' within 'escaped text' E.g. 'o''clock'

close #7151
2015-03-01 00:02:35 +01:00
..
2014-08-12 13:35:45 +02: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 and that you installed all composer dependencies (run composer update in the repo base directory).

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. You can override configuration values by creating a config.local.php file and manipulate the $config variable. For example to change MySQL username and password your config.local.php should contain the following:

<?php
$config['databases']['mysql']['username'] = 'yiitest';
$config['databases']['mysql']['password'] = 'changeme';