diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 803e852..6debe5e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - - ./tests/unit + ./tests diff --git a/tests/unit/.gitignore b/tests/.gitignore similarity index 100% rename from tests/unit/.gitignore rename to tests/.gitignore diff --git a/tests/README.md b/tests/README.md index 028f74a..d55d549 100644 --- a/tests/README.md +++ b/tests/README.md @@ -4,12 +4,10 @@ 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 + 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 HOW TO RUN THE TESTS @@ -19,18 +17,24 @@ Make sure you have PHPUnit installed and that you installed all composer depende Run PHPUnit in the yii repo base directory. -```php +``` phpunit ``` You can run tests for specific groups only: -```php +``` phpunit --group=mysql,base,i18n ``` You can get a list of available groups via `phpunit --list-groups`. +A single test class could be run like the follwing: + +``` +phpunit tests/framework/base/ObjectTest.php +``` + TEST CONFIGURATION ------------------ diff --git a/tests/unit/TestCase.php b/tests/TestCase.php similarity index 100% rename from tests/unit/TestCase.php rename to tests/TestCase.php diff --git a/tests/unit/assets/.gitignore b/tests/assets/.gitignore similarity index 100% rename from tests/unit/assets/.gitignore rename to tests/assets/.gitignore diff --git a/tests/unit/bootstrap.php b/tests/bootstrap.php similarity index 72% rename from tests/unit/bootstrap.php rename to tests/bootstrap.php index 39a7c59..1aeaedc 100644 --- a/tests/unit/bootstrap.php +++ b/tests/bootstrap.php @@ -9,13 +9,13 @@ $_SERVER['SCRIPT_NAME'] = '/' . __DIR__; $_SERVER['SCRIPT_FILENAME'] = __FILE__; // require composer autoloader if available -$composerAutoload = __DIR__ . '/../../vendor/autoload.php'; +$composerAutoload = __DIR__ . '/../vendor/autoload.php'; if (is_file($composerAutoload)) { require_once($composerAutoload); } else { - require_once(__DIR__ . '/../../../../autoload.php'); + require_once(__DIR__ . '/../../../autoload.php'); } -require_once(__DIR__ . '/../../framework/Yii.php'); +require_once(__DIR__ . '/../framework/Yii.php'); Yii::setAlias('@yiiunit', __DIR__); diff --git a/tests/unit/data/ar/ActiveRecord.php b/tests/data/ar/ActiveRecord.php similarity index 100% rename from tests/unit/data/ar/ActiveRecord.php rename to tests/data/ar/ActiveRecord.php diff --git a/tests/unit/data/ar/Animal.php b/tests/data/ar/Animal.php similarity index 100% rename from tests/unit/data/ar/Animal.php rename to tests/data/ar/Animal.php diff --git a/tests/unit/data/ar/Cat.php b/tests/data/ar/Cat.php similarity index 100% rename from tests/unit/data/ar/Cat.php rename to tests/data/ar/Cat.php diff --git a/tests/unit/data/ar/Category.php b/tests/data/ar/Category.php similarity index 100% rename from tests/unit/data/ar/Category.php rename to tests/data/ar/Category.php diff --git a/tests/unit/data/ar/Customer.php b/tests/data/ar/Customer.php similarity index 100% rename from tests/unit/data/ar/Customer.php rename to tests/data/ar/Customer.php diff --git a/tests/unit/data/ar/CustomerQuery.php b/tests/data/ar/CustomerQuery.php similarity index 100% rename from tests/unit/data/ar/CustomerQuery.php rename to tests/data/ar/CustomerQuery.php diff --git a/tests/unit/data/ar/Dog.php b/tests/data/ar/Dog.php similarity index 100% rename from tests/unit/data/ar/Dog.php rename to tests/data/ar/Dog.php diff --git a/tests/unit/data/ar/Item.php b/tests/data/ar/Item.php similarity index 100% rename from tests/unit/data/ar/Item.php rename to tests/data/ar/Item.php diff --git a/tests/unit/data/ar/NullValues.php b/tests/data/ar/NullValues.php similarity index 100% rename from tests/unit/data/ar/NullValues.php rename to tests/data/ar/NullValues.php diff --git a/tests/unit/data/ar/Order.php b/tests/data/ar/Order.php similarity index 100% rename from tests/unit/data/ar/Order.php rename to tests/data/ar/Order.php diff --git a/tests/unit/data/ar/OrderItem.php b/tests/data/ar/OrderItem.php similarity index 100% rename from tests/unit/data/ar/OrderItem.php rename to tests/data/ar/OrderItem.php diff --git a/tests/unit/data/ar/OrderItemWithNullFK.php b/tests/data/ar/OrderItemWithNullFK.php similarity index 100% rename from tests/unit/data/ar/OrderItemWithNullFK.php rename to tests/data/ar/OrderItemWithNullFK.php diff --git a/tests/unit/data/ar/OrderWithNullFK.php b/tests/data/ar/OrderWithNullFK.php similarity index 100% rename from tests/unit/data/ar/OrderWithNullFK.php rename to tests/data/ar/OrderWithNullFK.php diff --git a/tests/unit/data/ar/Profile.php b/tests/data/ar/Profile.php similarity index 100% rename from tests/unit/data/ar/Profile.php rename to tests/data/ar/Profile.php diff --git a/tests/unit/data/ar/Type.php b/tests/data/ar/Type.php similarity index 100% rename from tests/unit/data/ar/Type.php rename to tests/data/ar/Type.php diff --git a/tests/unit/data/base/InvalidRulesModel.php b/tests/data/base/InvalidRulesModel.php similarity index 100% rename from tests/unit/data/base/InvalidRulesModel.php rename to tests/data/base/InvalidRulesModel.php diff --git a/tests/unit/data/base/Singer.php b/tests/data/base/Singer.php similarity index 100% rename from tests/unit/data/base/Singer.php rename to tests/data/base/Singer.php diff --git a/tests/unit/data/base/Speaker.php b/tests/data/base/Speaker.php similarity index 100% rename from tests/unit/data/base/Speaker.php rename to tests/data/base/Speaker.php diff --git a/tests/unit/data/config.php b/tests/data/config.php similarity index 100% rename from tests/unit/data/config.php rename to tests/data/config.php diff --git a/tests/unit/data/console/controllers/fixtures/FirstFixture.php b/tests/data/console/controllers/fixtures/FirstFixture.php similarity index 100% rename from tests/unit/data/console/controllers/fixtures/FirstFixture.php rename to tests/data/console/controllers/fixtures/FirstFixture.php diff --git a/tests/unit/data/console/controllers/fixtures/FixtureStorage.php b/tests/data/console/controllers/fixtures/FixtureStorage.php similarity index 100% rename from tests/unit/data/console/controllers/fixtures/FixtureStorage.php rename to tests/data/console/controllers/fixtures/FixtureStorage.php diff --git a/tests/unit/data/console/controllers/fixtures/GlobalFixture.php b/tests/data/console/controllers/fixtures/GlobalFixture.php similarity index 100% rename from tests/unit/data/console/controllers/fixtures/GlobalFixture.php rename to tests/data/console/controllers/fixtures/GlobalFixture.php diff --git a/tests/unit/data/console/controllers/fixtures/SecondFixture.php b/tests/data/console/controllers/fixtures/SecondFixture.php similarity index 100% rename from tests/unit/data/console/controllers/fixtures/SecondFixture.php rename to tests/data/console/controllers/fixtures/SecondFixture.php diff --git a/tests/unit/data/cubrid.sql b/tests/data/cubrid.sql similarity index 100% rename from tests/unit/data/cubrid.sql rename to tests/data/cubrid.sql diff --git a/tests/unit/data/i18n/messages/de-DE/test.php b/tests/data/i18n/messages/de-DE/test.php similarity index 100% rename from tests/unit/data/i18n/messages/de-DE/test.php rename to tests/data/i18n/messages/de-DE/test.php diff --git a/tests/unit/data/i18n/messages/de/test.php b/tests/data/i18n/messages/de/test.php similarity index 100% rename from tests/unit/data/i18n/messages/de/test.php rename to tests/data/i18n/messages/de/test.php diff --git a/tests/unit/data/i18n/messages/en-US/test.php b/tests/data/i18n/messages/en-US/test.php similarity index 100% rename from tests/unit/data/i18n/messages/en-US/test.php rename to tests/data/i18n/messages/en-US/test.php diff --git a/tests/unit/data/i18n/messages/ru/test.php b/tests/data/i18n/messages/ru/test.php similarity index 100% rename from tests/unit/data/i18n/messages/ru/test.php rename to tests/data/i18n/messages/ru/test.php diff --git a/tests/unit/data/i18n/test.mo b/tests/data/i18n/test.mo similarity index 100% rename from tests/unit/data/i18n/test.mo rename to tests/data/i18n/test.mo diff --git a/tests/unit/data/i18n/test.po b/tests/data/i18n/test.po similarity index 100% rename from tests/unit/data/i18n/test.po rename to tests/data/i18n/test.po diff --git a/tests/unit/data/mssql.sql b/tests/data/mssql.sql similarity index 100% rename from tests/unit/data/mssql.sql rename to tests/data/mssql.sql diff --git a/tests/unit/data/mysql.sql b/tests/data/mysql.sql similarity index 100% rename from tests/unit/data/mysql.sql rename to tests/data/mysql.sql diff --git a/tests/unit/data/oci.sql b/tests/data/oci.sql similarity index 100% rename from tests/unit/data/oci.sql rename to tests/data/oci.sql diff --git a/tests/unit/data/postgres.sql b/tests/data/postgres.sql similarity index 100% rename from tests/unit/data/postgres.sql rename to tests/data/postgres.sql diff --git a/tests/unit/data/sqlite.sql b/tests/data/sqlite.sql similarity index 100% rename from tests/unit/data/sqlite.sql rename to tests/data/sqlite.sql diff --git a/tests/unit/data/travis/README.md b/tests/data/travis/README.md similarity index 100% rename from tests/unit/data/travis/README.md rename to tests/data/travis/README.md diff --git a/tests/unit/data/travis/apc-setup.sh b/tests/data/travis/apc-setup.sh old mode 100755 new mode 100644 similarity index 100% rename from tests/unit/data/travis/apc-setup.sh rename to tests/data/travis/apc-setup.sh diff --git a/tests/unit/data/travis/cubrid-setup.sh b/tests/data/travis/cubrid-setup.sh old mode 100755 new mode 100644 similarity index 100% rename from tests/unit/data/travis/cubrid-setup.sh rename to tests/data/travis/cubrid-setup.sh diff --git a/tests/unit/data/travis/cubrid-solo.rb b/tests/data/travis/cubrid-solo.rb similarity index 100% rename from tests/unit/data/travis/cubrid-solo.rb rename to tests/data/travis/cubrid-solo.rb diff --git a/tests/unit/data/travis/memcache-setup.sh b/tests/data/travis/memcache-setup.sh old mode 100755 new mode 100644 similarity index 100% rename from tests/unit/data/travis/memcache-setup.sh rename to tests/data/travis/memcache-setup.sh diff --git a/tests/unit/data/validators/TestValidator.php b/tests/data/validators/TestValidator.php similarity index 100% rename from tests/unit/data/validators/TestValidator.php rename to tests/data/validators/TestValidator.php diff --git a/tests/unit/data/validators/models/FakedValidationModel.php b/tests/data/validators/models/FakedValidationModel.php similarity index 100% rename from tests/unit/data/validators/models/FakedValidationModel.php rename to tests/data/validators/models/FakedValidationModel.php diff --git a/tests/unit/data/validators/models/ValidatorTestMainModel.php b/tests/data/validators/models/ValidatorTestMainModel.php similarity index 100% rename from tests/unit/data/validators/models/ValidatorTestMainModel.php rename to tests/data/validators/models/ValidatorTestMainModel.php diff --git a/tests/unit/data/validators/models/ValidatorTestRefModel.php b/tests/data/validators/models/ValidatorTestRefModel.php similarity index 100% rename from tests/unit/data/validators/models/ValidatorTestRefModel.php rename to tests/data/validators/models/ValidatorTestRefModel.php diff --git a/tests/unit/data/views/layout.php b/tests/data/views/layout.php similarity index 100% rename from tests/unit/data/views/layout.php rename to tests/data/views/layout.php diff --git a/tests/unit/data/views/rawlayout.php b/tests/data/views/rawlayout.php similarity index 100% rename from tests/unit/data/views/rawlayout.php rename to tests/data/views/rawlayout.php diff --git a/tests/unit/data/views/simple.php b/tests/data/views/simple.php similarity index 100% rename from tests/unit/data/views/simple.php rename to tests/data/views/simple.php diff --git a/tests/unit/data/web/assets/.gitignore b/tests/data/web/assets/.gitignore similarity index 100% rename from tests/unit/data/web/assets/.gitignore rename to tests/data/web/assets/.gitignore diff --git a/tests/unit/data/web/data.txt b/tests/data/web/data.txt similarity index 100% rename from tests/unit/data/web/data.txt rename to tests/data/web/data.txt diff --git a/tests/unit/framework/BaseYiiTest.php b/tests/framework/BaseYiiTest.php similarity index 100% rename from tests/unit/framework/BaseYiiTest.php rename to tests/framework/BaseYiiTest.php diff --git a/tests/unit/framework/ar/ActiveRecordTestTrait.php b/tests/framework/ar/ActiveRecordTestTrait.php similarity index 100% rename from tests/unit/framework/ar/ActiveRecordTestTrait.php rename to tests/framework/ar/ActiveRecordTestTrait.php diff --git a/tests/unit/framework/base/ActionFilterTest.php b/tests/framework/base/ActionFilterTest.php similarity index 100% rename from tests/unit/framework/base/ActionFilterTest.php rename to tests/framework/base/ActionFilterTest.php diff --git a/tests/unit/framework/base/BehaviorTest.php b/tests/framework/base/BehaviorTest.php similarity index 100% rename from tests/unit/framework/base/BehaviorTest.php rename to tests/framework/base/BehaviorTest.php diff --git a/tests/unit/framework/base/ComponentTest.php b/tests/framework/base/ComponentTest.php similarity index 100% rename from tests/unit/framework/base/ComponentTest.php rename to tests/framework/base/ComponentTest.php diff --git a/tests/unit/framework/base/DynamicModelTest.php b/tests/framework/base/DynamicModelTest.php similarity index 100% rename from tests/unit/framework/base/DynamicModelTest.php rename to tests/framework/base/DynamicModelTest.php diff --git a/tests/unit/framework/base/EventTest.php b/tests/framework/base/EventTest.php similarity index 100% rename from tests/unit/framework/base/EventTest.php rename to tests/framework/base/EventTest.php diff --git a/tests/unit/framework/base/ExposedSecurity.php b/tests/framework/base/ExposedSecurity.php similarity index 100% rename from tests/unit/framework/base/ExposedSecurity.php rename to tests/framework/base/ExposedSecurity.php diff --git a/tests/unit/framework/base/ModelTest.php b/tests/framework/base/ModelTest.php similarity index 100% rename from tests/unit/framework/base/ModelTest.php rename to tests/framework/base/ModelTest.php diff --git a/tests/unit/framework/base/ObjectTest.php b/tests/framework/base/ObjectTest.php similarity index 100% rename from tests/unit/framework/base/ObjectTest.php rename to tests/framework/base/ObjectTest.php diff --git a/tests/unit/framework/base/SecurityTest.php b/tests/framework/base/SecurityTest.php similarity index 100% rename from tests/unit/framework/base/SecurityTest.php rename to tests/framework/base/SecurityTest.php diff --git a/tests/unit/framework/behaviors/SluggableBehaviorTest.php b/tests/framework/behaviors/SluggableBehaviorTest.php similarity index 100% rename from tests/unit/framework/behaviors/SluggableBehaviorTest.php rename to tests/framework/behaviors/SluggableBehaviorTest.php diff --git a/tests/unit/framework/behaviors/TimestampBehaviorTest.php b/tests/framework/behaviors/TimestampBehaviorTest.php similarity index 100% rename from tests/unit/framework/behaviors/TimestampBehaviorTest.php rename to tests/framework/behaviors/TimestampBehaviorTest.php diff --git a/tests/unit/framework/caching/ApcCacheTest.php b/tests/framework/caching/ApcCacheTest.php similarity index 100% rename from tests/unit/framework/caching/ApcCacheTest.php rename to tests/framework/caching/ApcCacheTest.php diff --git a/tests/unit/framework/caching/ArrayCacheTest.php b/tests/framework/caching/ArrayCacheTest.php similarity index 100% rename from tests/unit/framework/caching/ArrayCacheTest.php rename to tests/framework/caching/ArrayCacheTest.php diff --git a/tests/unit/framework/caching/CacheTestCase.php b/tests/framework/caching/CacheTestCase.php similarity index 100% rename from tests/unit/framework/caching/CacheTestCase.php rename to tests/framework/caching/CacheTestCase.php diff --git a/tests/unit/framework/caching/DbCacheTest.php b/tests/framework/caching/DbCacheTest.php similarity index 100% rename from tests/unit/framework/caching/DbCacheTest.php rename to tests/framework/caching/DbCacheTest.php diff --git a/tests/unit/framework/caching/FileCacheTest.php b/tests/framework/caching/FileCacheTest.php similarity index 100% rename from tests/unit/framework/caching/FileCacheTest.php rename to tests/framework/caching/FileCacheTest.php diff --git a/tests/unit/framework/caching/MemCacheTest.php b/tests/framework/caching/MemCacheTest.php similarity index 100% rename from tests/unit/framework/caching/MemCacheTest.php rename to tests/framework/caching/MemCacheTest.php diff --git a/tests/unit/framework/caching/MemCachedTest.php b/tests/framework/caching/MemCachedTest.php similarity index 100% rename from tests/unit/framework/caching/MemCachedTest.php rename to tests/framework/caching/MemCachedTest.php diff --git a/tests/unit/framework/caching/TagDependencyTest.php b/tests/framework/caching/TagDependencyTest.php similarity index 100% rename from tests/unit/framework/caching/TagDependencyTest.php rename to tests/framework/caching/TagDependencyTest.php diff --git a/tests/unit/framework/caching/WinCacheTest.php b/tests/framework/caching/WinCacheTest.php similarity index 100% rename from tests/unit/framework/caching/WinCacheTest.php rename to tests/framework/caching/WinCacheTest.php diff --git a/tests/unit/framework/caching/XCacheTest.php b/tests/framework/caching/XCacheTest.php similarity index 100% rename from tests/unit/framework/caching/XCacheTest.php rename to tests/framework/caching/XCacheTest.php diff --git a/tests/unit/framework/caching/ZendDataCacheTest.php b/tests/framework/caching/ZendDataCacheTest.php similarity index 100% rename from tests/unit/framework/caching/ZendDataCacheTest.php rename to tests/framework/caching/ZendDataCacheTest.php diff --git a/tests/unit/framework/console/controllers/AssetControllerTest.php b/tests/framework/console/controllers/AssetControllerTest.php similarity index 100% rename from tests/unit/framework/console/controllers/AssetControllerTest.php rename to tests/framework/console/controllers/AssetControllerTest.php diff --git a/tests/unit/framework/console/controllers/BaseMessageControllerTest.php b/tests/framework/console/controllers/BaseMessageControllerTest.php similarity index 100% rename from tests/unit/framework/console/controllers/BaseMessageControllerTest.php rename to tests/framework/console/controllers/BaseMessageControllerTest.php diff --git a/tests/unit/framework/console/controllers/CacheControllerTest.php b/tests/framework/console/controllers/CacheControllerTest.php similarity index 100% rename from tests/unit/framework/console/controllers/CacheControllerTest.php rename to tests/framework/console/controllers/CacheControllerTest.php diff --git a/tests/unit/framework/console/controllers/EchoMigrateController.php b/tests/framework/console/controllers/EchoMigrateController.php similarity index 100% rename from tests/unit/framework/console/controllers/EchoMigrateController.php rename to tests/framework/console/controllers/EchoMigrateController.php diff --git a/tests/unit/framework/console/controllers/FixtureControllerTest.php b/tests/framework/console/controllers/FixtureControllerTest.php similarity index 100% rename from tests/unit/framework/console/controllers/FixtureControllerTest.php rename to tests/framework/console/controllers/FixtureControllerTest.php diff --git a/tests/unit/framework/console/controllers/MigrateControllerTest.php b/tests/framework/console/controllers/MigrateControllerTest.php similarity index 100% rename from tests/unit/framework/console/controllers/MigrateControllerTest.php rename to tests/framework/console/controllers/MigrateControllerTest.php diff --git a/tests/unit/framework/console/controllers/MigrateControllerTestTrait.php b/tests/framework/console/controllers/MigrateControllerTestTrait.php similarity index 100% rename from tests/unit/framework/console/controllers/MigrateControllerTestTrait.php rename to tests/framework/console/controllers/MigrateControllerTestTrait.php diff --git a/tests/unit/framework/console/controllers/PHPMessageControllerTest.php b/tests/framework/console/controllers/PHPMessageControllerTest.php similarity index 100% rename from tests/unit/framework/console/controllers/PHPMessageControllerTest.php rename to tests/framework/console/controllers/PHPMessageControllerTest.php diff --git a/tests/unit/framework/console/controllers/POMessageControllerTest.php b/tests/framework/console/controllers/POMessageControllerTest.php similarity index 100% rename from tests/unit/framework/console/controllers/POMessageControllerTest.php rename to tests/framework/console/controllers/POMessageControllerTest.php diff --git a/tests/unit/framework/console/controllers/SilencedCacheController.php b/tests/framework/console/controllers/SilencedCacheController.php similarity index 100% rename from tests/unit/framework/console/controllers/SilencedCacheController.php rename to tests/framework/console/controllers/SilencedCacheController.php diff --git a/tests/unit/framework/console/controllers/StdOutBufferControllerTrait.php b/tests/framework/console/controllers/StdOutBufferControllerTrait.php similarity index 100% rename from tests/unit/framework/console/controllers/StdOutBufferControllerTrait.php rename to tests/framework/console/controllers/StdOutBufferControllerTrait.php diff --git a/tests/unit/framework/data/ActiveDataProviderTest.php b/tests/framework/data/ActiveDataProviderTest.php similarity index 100% rename from tests/unit/framework/data/ActiveDataProviderTest.php rename to tests/framework/data/ActiveDataProviderTest.php diff --git a/tests/unit/framework/data/ArrayDataProviderTest.php b/tests/framework/data/ArrayDataProviderTest.php similarity index 100% rename from tests/unit/framework/data/ArrayDataProviderTest.php rename to tests/framework/data/ArrayDataProviderTest.php diff --git a/tests/unit/framework/data/SortTest.php b/tests/framework/data/SortTest.php similarity index 100% rename from tests/unit/framework/data/SortTest.php rename to tests/framework/data/SortTest.php diff --git a/tests/unit/framework/db/ActiveRecordTest.php b/tests/framework/db/ActiveRecordTest.php similarity index 100% rename from tests/unit/framework/db/ActiveRecordTest.php rename to tests/framework/db/ActiveRecordTest.php diff --git a/tests/unit/framework/db/BatchQueryResultTest.php b/tests/framework/db/BatchQueryResultTest.php similarity index 100% rename from tests/unit/framework/db/BatchQueryResultTest.php rename to tests/framework/db/BatchQueryResultTest.php diff --git a/tests/unit/framework/db/CommandTest.php b/tests/framework/db/CommandTest.php similarity index 100% rename from tests/unit/framework/db/CommandTest.php rename to tests/framework/db/CommandTest.php diff --git a/tests/unit/framework/db/ConnectionTest.php b/tests/framework/db/ConnectionTest.php similarity index 100% rename from tests/unit/framework/db/ConnectionTest.php rename to tests/framework/db/ConnectionTest.php diff --git a/tests/unit/framework/db/DatabaseTestCase.php b/tests/framework/db/DatabaseTestCase.php similarity index 100% rename from tests/unit/framework/db/DatabaseTestCase.php rename to tests/framework/db/DatabaseTestCase.php diff --git a/tests/unit/framework/db/QueryBuilderTest.php b/tests/framework/db/QueryBuilderTest.php similarity index 100% rename from tests/unit/framework/db/QueryBuilderTest.php rename to tests/framework/db/QueryBuilderTest.php diff --git a/tests/unit/framework/db/QueryTest.php b/tests/framework/db/QueryTest.php similarity index 100% rename from tests/unit/framework/db/QueryTest.php rename to tests/framework/db/QueryTest.php diff --git a/tests/unit/framework/db/SchemaTest.php b/tests/framework/db/SchemaTest.php similarity index 100% rename from tests/unit/framework/db/SchemaTest.php rename to tests/framework/db/SchemaTest.php diff --git a/tests/unit/framework/db/cubrid/CubridActiveDataProviderTest.php b/tests/framework/db/cubrid/CubridActiveDataProviderTest.php similarity index 100% rename from tests/unit/framework/db/cubrid/CubridActiveDataProviderTest.php rename to tests/framework/db/cubrid/CubridActiveDataProviderTest.php diff --git a/tests/unit/framework/db/cubrid/CubridActiveRecordTest.php b/tests/framework/db/cubrid/CubridActiveRecordTest.php similarity index 100% rename from tests/unit/framework/db/cubrid/CubridActiveRecordTest.php rename to tests/framework/db/cubrid/CubridActiveRecordTest.php diff --git a/tests/unit/framework/db/cubrid/CubridCommandTest.php b/tests/framework/db/cubrid/CubridCommandTest.php similarity index 100% rename from tests/unit/framework/db/cubrid/CubridCommandTest.php rename to tests/framework/db/cubrid/CubridCommandTest.php diff --git a/tests/unit/framework/db/cubrid/CubridConnectionTest.php b/tests/framework/db/cubrid/CubridConnectionTest.php similarity index 100% rename from tests/unit/framework/db/cubrid/CubridConnectionTest.php rename to tests/framework/db/cubrid/CubridConnectionTest.php diff --git a/tests/unit/framework/db/cubrid/CubridQueryBuilderTest.php b/tests/framework/db/cubrid/CubridQueryBuilderTest.php similarity index 100% rename from tests/unit/framework/db/cubrid/CubridQueryBuilderTest.php rename to tests/framework/db/cubrid/CubridQueryBuilderTest.php diff --git a/tests/unit/framework/db/cubrid/CubridQueryTest.php b/tests/framework/db/cubrid/CubridQueryTest.php similarity index 100% rename from tests/unit/framework/db/cubrid/CubridQueryTest.php rename to tests/framework/db/cubrid/CubridQueryTest.php diff --git a/tests/unit/framework/db/cubrid/CubridSchemaTest.php b/tests/framework/db/cubrid/CubridSchemaTest.php similarity index 100% rename from tests/unit/framework/db/cubrid/CubridSchemaTest.php rename to tests/framework/db/cubrid/CubridSchemaTest.php diff --git a/tests/unit/framework/db/mssql/MssqlActiveDataProviderTest.php b/tests/framework/db/mssql/MssqlActiveDataProviderTest.php similarity index 100% rename from tests/unit/framework/db/mssql/MssqlActiveDataProviderTest.php rename to tests/framework/db/mssql/MssqlActiveDataProviderTest.php diff --git a/tests/unit/framework/db/mssql/MssqlActiveRecordTest.php b/tests/framework/db/mssql/MssqlActiveRecordTest.php similarity index 100% rename from tests/unit/framework/db/mssql/MssqlActiveRecordTest.php rename to tests/framework/db/mssql/MssqlActiveRecordTest.php diff --git a/tests/unit/framework/db/mssql/MssqlCommandTest.php b/tests/framework/db/mssql/MssqlCommandTest.php similarity index 100% rename from tests/unit/framework/db/mssql/MssqlCommandTest.php rename to tests/framework/db/mssql/MssqlCommandTest.php diff --git a/tests/unit/framework/db/mssql/MssqlConnectionTest.php b/tests/framework/db/mssql/MssqlConnectionTest.php similarity index 100% rename from tests/unit/framework/db/mssql/MssqlConnectionTest.php rename to tests/framework/db/mssql/MssqlConnectionTest.php diff --git a/tests/unit/framework/db/mssql/MssqlQueryBuilderTest.php b/tests/framework/db/mssql/MssqlQueryBuilderTest.php similarity index 100% rename from tests/unit/framework/db/mssql/MssqlQueryBuilderTest.php rename to tests/framework/db/mssql/MssqlQueryBuilderTest.php diff --git a/tests/unit/framework/db/mssql/MssqlQueryTest.php b/tests/framework/db/mssql/MssqlQueryTest.php similarity index 100% rename from tests/unit/framework/db/mssql/MssqlQueryTest.php rename to tests/framework/db/mssql/MssqlQueryTest.php diff --git a/tests/unit/framework/db/oci/OracleActiveDataProviderTest.php b/tests/framework/db/oci/OracleActiveDataProviderTest.php similarity index 100% rename from tests/unit/framework/db/oci/OracleActiveDataProviderTest.php rename to tests/framework/db/oci/OracleActiveDataProviderTest.php diff --git a/tests/unit/framework/db/oci/OracleActiveRecordTest.php b/tests/framework/db/oci/OracleActiveRecordTest.php similarity index 100% rename from tests/unit/framework/db/oci/OracleActiveRecordTest.php rename to tests/framework/db/oci/OracleActiveRecordTest.php diff --git a/tests/unit/framework/db/oci/OracleCommandTest.php b/tests/framework/db/oci/OracleCommandTest.php similarity index 100% rename from tests/unit/framework/db/oci/OracleCommandTest.php rename to tests/framework/db/oci/OracleCommandTest.php diff --git a/tests/unit/framework/db/oci/OracleQueryTest.php b/tests/framework/db/oci/OracleQueryTest.php similarity index 100% rename from tests/unit/framework/db/oci/OracleQueryTest.php rename to tests/framework/db/oci/OracleQueryTest.php diff --git a/tests/unit/framework/db/oci/OracleSchemaTest.php b/tests/framework/db/oci/OracleSchemaTest.php similarity index 100% rename from tests/unit/framework/db/oci/OracleSchemaTest.php rename to tests/framework/db/oci/OracleSchemaTest.php diff --git a/tests/unit/framework/db/pgsql/PostgreSQLActiveDataProviderTest.php b/tests/framework/db/pgsql/PostgreSQLActiveDataProviderTest.php similarity index 100% rename from tests/unit/framework/db/pgsql/PostgreSQLActiveDataProviderTest.php rename to tests/framework/db/pgsql/PostgreSQLActiveDataProviderTest.php diff --git a/tests/unit/framework/db/pgsql/PostgreSQLActiveRecordTest.php b/tests/framework/db/pgsql/PostgreSQLActiveRecordTest.php similarity index 100% rename from tests/unit/framework/db/pgsql/PostgreSQLActiveRecordTest.php rename to tests/framework/db/pgsql/PostgreSQLActiveRecordTest.php diff --git a/tests/unit/framework/db/pgsql/PostgreSQLCommandTest.php b/tests/framework/db/pgsql/PostgreSQLCommandTest.php similarity index 100% rename from tests/unit/framework/db/pgsql/PostgreSQLCommandTest.php rename to tests/framework/db/pgsql/PostgreSQLCommandTest.php diff --git a/tests/unit/framework/db/pgsql/PostgreSQLConnectionTest.php b/tests/framework/db/pgsql/PostgreSQLConnectionTest.php similarity index 100% rename from tests/unit/framework/db/pgsql/PostgreSQLConnectionTest.php rename to tests/framework/db/pgsql/PostgreSQLConnectionTest.php diff --git a/tests/unit/framework/db/pgsql/PostgreSQLQueryBuilderTest.php b/tests/framework/db/pgsql/PostgreSQLQueryBuilderTest.php similarity index 100% rename from tests/unit/framework/db/pgsql/PostgreSQLQueryBuilderTest.php rename to tests/framework/db/pgsql/PostgreSQLQueryBuilderTest.php diff --git a/tests/unit/framework/db/pgsql/PostgreSQLQueryTest.php b/tests/framework/db/pgsql/PostgreSQLQueryTest.php similarity index 100% rename from tests/unit/framework/db/pgsql/PostgreSQLQueryTest.php rename to tests/framework/db/pgsql/PostgreSQLQueryTest.php diff --git a/tests/unit/framework/db/pgsql/PostgreSQLSchemaTest.php b/tests/framework/db/pgsql/PostgreSQLSchemaTest.php similarity index 100% rename from tests/unit/framework/db/pgsql/PostgreSQLSchemaTest.php rename to tests/framework/db/pgsql/PostgreSQLSchemaTest.php diff --git a/tests/unit/framework/db/sqlite/SqliteActiveDataProviderTest.php b/tests/framework/db/sqlite/SqliteActiveDataProviderTest.php similarity index 100% rename from tests/unit/framework/db/sqlite/SqliteActiveDataProviderTest.php rename to tests/framework/db/sqlite/SqliteActiveDataProviderTest.php diff --git a/tests/unit/framework/db/sqlite/SqliteActiveRecordTest.php b/tests/framework/db/sqlite/SqliteActiveRecordTest.php similarity index 100% rename from tests/unit/framework/db/sqlite/SqliteActiveRecordTest.php rename to tests/framework/db/sqlite/SqliteActiveRecordTest.php diff --git a/tests/unit/framework/db/sqlite/SqliteCommandTest.php b/tests/framework/db/sqlite/SqliteCommandTest.php similarity index 100% rename from tests/unit/framework/db/sqlite/SqliteCommandTest.php rename to tests/framework/db/sqlite/SqliteCommandTest.php diff --git a/tests/unit/framework/db/sqlite/SqliteConnectionTest.php b/tests/framework/db/sqlite/SqliteConnectionTest.php similarity index 100% rename from tests/unit/framework/db/sqlite/SqliteConnectionTest.php rename to tests/framework/db/sqlite/SqliteConnectionTest.php diff --git a/tests/unit/framework/db/sqlite/SqliteQueryBuilderTest.php b/tests/framework/db/sqlite/SqliteQueryBuilderTest.php similarity index 100% rename from tests/unit/framework/db/sqlite/SqliteQueryBuilderTest.php rename to tests/framework/db/sqlite/SqliteQueryBuilderTest.php diff --git a/tests/unit/framework/db/sqlite/SqliteQueryTest.php b/tests/framework/db/sqlite/SqliteQueryTest.php similarity index 100% rename from tests/unit/framework/db/sqlite/SqliteQueryTest.php rename to tests/framework/db/sqlite/SqliteQueryTest.php diff --git a/tests/unit/framework/db/sqlite/SqliteSchemaTest.php b/tests/framework/db/sqlite/SqliteSchemaTest.php similarity index 100% rename from tests/unit/framework/db/sqlite/SqliteSchemaTest.php rename to tests/framework/db/sqlite/SqliteSchemaTest.php diff --git a/tests/unit/framework/di/ContainerTest.php b/tests/framework/di/ContainerTest.php similarity index 100% rename from tests/unit/framework/di/ContainerTest.php rename to tests/framework/di/ContainerTest.php diff --git a/tests/unit/framework/di/InstanceTest.php b/tests/framework/di/InstanceTest.php similarity index 100% rename from tests/unit/framework/di/InstanceTest.php rename to tests/framework/di/InstanceTest.php diff --git a/tests/unit/framework/di/ServiceLocatorTest.php b/tests/framework/di/ServiceLocatorTest.php similarity index 100% rename from tests/unit/framework/di/ServiceLocatorTest.php rename to tests/framework/di/ServiceLocatorTest.php diff --git a/tests/unit/framework/di/stubs/Bar.php b/tests/framework/di/stubs/Bar.php similarity index 100% rename from tests/unit/framework/di/stubs/Bar.php rename to tests/framework/di/stubs/Bar.php diff --git a/tests/unit/framework/di/stubs/Foo.php b/tests/framework/di/stubs/Foo.php similarity index 100% rename from tests/unit/framework/di/stubs/Foo.php rename to tests/framework/di/stubs/Foo.php diff --git a/tests/unit/framework/di/stubs/Qux.php b/tests/framework/di/stubs/Qux.php similarity index 100% rename from tests/unit/framework/di/stubs/Qux.php rename to tests/framework/di/stubs/Qux.php diff --git a/tests/unit/framework/di/stubs/QuxInterface.php b/tests/framework/di/stubs/QuxInterface.php similarity index 100% rename from tests/unit/framework/di/stubs/QuxInterface.php rename to tests/framework/di/stubs/QuxInterface.php diff --git a/tests/unit/framework/filters/CompositeAuthTest.php b/tests/framework/filters/CompositeAuthTest.php similarity index 100% rename from tests/unit/framework/filters/CompositeAuthTest.php rename to tests/framework/filters/CompositeAuthTest.php diff --git a/tests/unit/framework/filters/HttpCacheTest.php b/tests/framework/filters/HttpCacheTest.php similarity index 100% rename from tests/unit/framework/filters/HttpCacheTest.php rename to tests/framework/filters/HttpCacheTest.php diff --git a/tests/unit/framework/helpers/ArrayHelperTest.php b/tests/framework/helpers/ArrayHelperTest.php similarity index 100% rename from tests/unit/framework/helpers/ArrayHelperTest.php rename to tests/framework/helpers/ArrayHelperTest.php diff --git a/tests/unit/framework/helpers/ConsoleTest.php b/tests/framework/helpers/ConsoleTest.php similarity index 100% rename from tests/unit/framework/helpers/ConsoleTest.php rename to tests/framework/helpers/ConsoleTest.php diff --git a/tests/unit/framework/helpers/FallbackInflector.php b/tests/framework/helpers/FallbackInflector.php similarity index 100% rename from tests/unit/framework/helpers/FallbackInflector.php rename to tests/framework/helpers/FallbackInflector.php diff --git a/tests/unit/framework/helpers/FileHelperTest.php b/tests/framework/helpers/FileHelperTest.php similarity index 100% rename from tests/unit/framework/helpers/FileHelperTest.php rename to tests/framework/helpers/FileHelperTest.php diff --git a/tests/unit/framework/helpers/FormatConverterTest.php b/tests/framework/helpers/FormatConverterTest.php similarity index 100% rename from tests/unit/framework/helpers/FormatConverterTest.php rename to tests/framework/helpers/FormatConverterTest.php diff --git a/tests/unit/framework/helpers/HtmlTest.php b/tests/framework/helpers/HtmlTest.php similarity index 100% rename from tests/unit/framework/helpers/HtmlTest.php rename to tests/framework/helpers/HtmlTest.php diff --git a/tests/unit/framework/helpers/InflectorTest.php b/tests/framework/helpers/InflectorTest.php similarity index 100% rename from tests/unit/framework/helpers/InflectorTest.php rename to tests/framework/helpers/InflectorTest.php diff --git a/tests/unit/framework/helpers/JsonTest.php b/tests/framework/helpers/JsonTest.php similarity index 100% rename from tests/unit/framework/helpers/JsonTest.php rename to tests/framework/helpers/JsonTest.php diff --git a/tests/unit/framework/helpers/StringHelperTest.php b/tests/framework/helpers/StringHelperTest.php similarity index 100% rename from tests/unit/framework/helpers/StringHelperTest.php rename to tests/framework/helpers/StringHelperTest.php diff --git a/tests/unit/framework/helpers/UrlTest.php b/tests/framework/helpers/UrlTest.php similarity index 100% rename from tests/unit/framework/helpers/UrlTest.php rename to tests/framework/helpers/UrlTest.php diff --git a/tests/unit/framework/helpers/VarDumperTest.php b/tests/framework/helpers/VarDumperTest.php similarity index 100% rename from tests/unit/framework/helpers/VarDumperTest.php rename to tests/framework/helpers/VarDumperTest.php diff --git a/tests/unit/framework/i18n/FallbackMessageFormatterTest.php b/tests/framework/i18n/FallbackMessageFormatterTest.php similarity index 100% rename from tests/unit/framework/i18n/FallbackMessageFormatterTest.php rename to tests/framework/i18n/FallbackMessageFormatterTest.php diff --git a/tests/unit/framework/i18n/FormatterDateTest.php b/tests/framework/i18n/FormatterDateTest.php similarity index 100% rename from tests/unit/framework/i18n/FormatterDateTest.php rename to tests/framework/i18n/FormatterDateTest.php diff --git a/tests/unit/framework/i18n/FormatterNumberTest.php b/tests/framework/i18n/FormatterNumberTest.php similarity index 100% rename from tests/unit/framework/i18n/FormatterNumberTest.php rename to tests/framework/i18n/FormatterNumberTest.php diff --git a/tests/unit/framework/i18n/FormatterTest.php b/tests/framework/i18n/FormatterTest.php similarity index 100% rename from tests/unit/framework/i18n/FormatterTest.php rename to tests/framework/i18n/FormatterTest.php diff --git a/tests/unit/framework/i18n/GettextMessageSourceTest.php b/tests/framework/i18n/GettextMessageSourceTest.php similarity index 100% rename from tests/unit/framework/i18n/GettextMessageSourceTest.php rename to tests/framework/i18n/GettextMessageSourceTest.php diff --git a/tests/unit/framework/i18n/GettextMoFileTest.php b/tests/framework/i18n/GettextMoFileTest.php similarity index 100% rename from tests/unit/framework/i18n/GettextMoFileTest.php rename to tests/framework/i18n/GettextMoFileTest.php diff --git a/tests/unit/framework/i18n/GettextPoFileTest.php b/tests/framework/i18n/GettextPoFileTest.php similarity index 100% rename from tests/unit/framework/i18n/GettextPoFileTest.php rename to tests/framework/i18n/GettextPoFileTest.php diff --git a/tests/unit/framework/i18n/I18NTest.php b/tests/framework/i18n/I18NTest.php similarity index 100% rename from tests/unit/framework/i18n/I18NTest.php rename to tests/framework/i18n/I18NTest.php diff --git a/tests/unit/framework/i18n/IntlTestHelper.php b/tests/framework/i18n/IntlTestHelper.php similarity index 100% rename from tests/unit/framework/i18n/IntlTestHelper.php rename to tests/framework/i18n/IntlTestHelper.php diff --git a/tests/unit/framework/i18n/MessageFormatterTest.php b/tests/framework/i18n/MessageFormatterTest.php similarity index 100% rename from tests/unit/framework/i18n/MessageFormatterTest.php rename to tests/framework/i18n/MessageFormatterTest.php diff --git a/tests/unit/framework/log/DbTargetTest.php b/tests/framework/log/DbTargetTest.php similarity index 100% rename from tests/unit/framework/log/DbTargetTest.php rename to tests/framework/log/DbTargetTest.php diff --git a/tests/unit/framework/log/FileTargetTest.php b/tests/framework/log/FileTargetTest.php similarity index 100% rename from tests/unit/framework/log/FileTargetTest.php rename to tests/framework/log/FileTargetTest.php diff --git a/tests/unit/framework/log/LoggerTest.php b/tests/framework/log/LoggerTest.php similarity index 100% rename from tests/unit/framework/log/LoggerTest.php rename to tests/framework/log/LoggerTest.php diff --git a/tests/unit/framework/log/MySQLTargetTest.php b/tests/framework/log/MySQLTargetTest.php similarity index 100% rename from tests/unit/framework/log/MySQLTargetTest.php rename to tests/framework/log/MySQLTargetTest.php diff --git a/tests/unit/framework/log/PgSQLTargetTest.php b/tests/framework/log/PgSQLTargetTest.php similarity index 100% rename from tests/unit/framework/log/PgSQLTargetTest.php rename to tests/framework/log/PgSQLTargetTest.php diff --git a/tests/unit/framework/log/SqliteTargetTest.php b/tests/framework/log/SqliteTargetTest.php similarity index 100% rename from tests/unit/framework/log/SqliteTargetTest.php rename to tests/framework/log/SqliteTargetTest.php diff --git a/tests/unit/framework/log/TargetTest.php b/tests/framework/log/TargetTest.php similarity index 100% rename from tests/unit/framework/log/TargetTest.php rename to tests/framework/log/TargetTest.php diff --git a/tests/unit/framework/mail/BaseMailerTest.php b/tests/framework/mail/BaseMailerTest.php similarity index 100% rename from tests/unit/framework/mail/BaseMailerTest.php rename to tests/framework/mail/BaseMailerTest.php diff --git a/tests/unit/framework/mail/BaseMessageTest.php b/tests/framework/mail/BaseMessageTest.php similarity index 100% rename from tests/unit/framework/mail/BaseMessageTest.php rename to tests/framework/mail/BaseMessageTest.php diff --git a/tests/unit/framework/rbac/AuthorRule.php b/tests/framework/rbac/AuthorRule.php similarity index 100% rename from tests/unit/framework/rbac/AuthorRule.php rename to tests/framework/rbac/AuthorRule.php diff --git a/tests/unit/framework/rbac/DbManagerTestCase.php b/tests/framework/rbac/DbManagerTestCase.php similarity index 100% rename from tests/unit/framework/rbac/DbManagerTestCase.php rename to tests/framework/rbac/DbManagerTestCase.php diff --git a/tests/unit/framework/rbac/ExposedPhpManager.php b/tests/framework/rbac/ExposedPhpManager.php similarity index 100% rename from tests/unit/framework/rbac/ExposedPhpManager.php rename to tests/framework/rbac/ExposedPhpManager.php diff --git a/tests/unit/framework/rbac/ManagerTestCase.php b/tests/framework/rbac/ManagerTestCase.php similarity index 100% rename from tests/unit/framework/rbac/ManagerTestCase.php rename to tests/framework/rbac/ManagerTestCase.php diff --git a/tests/unit/framework/rbac/MySQLManagerCacheTest.php b/tests/framework/rbac/MySQLManagerCacheTest.php similarity index 100% rename from tests/unit/framework/rbac/MySQLManagerCacheTest.php rename to tests/framework/rbac/MySQLManagerCacheTest.php diff --git a/tests/unit/framework/rbac/MySQLManagerTest.php b/tests/framework/rbac/MySQLManagerTest.php similarity index 100% rename from tests/unit/framework/rbac/MySQLManagerTest.php rename to tests/framework/rbac/MySQLManagerTest.php diff --git a/tests/unit/framework/rbac/PgSQLManagerTest.php b/tests/framework/rbac/PgSQLManagerTest.php similarity index 100% rename from tests/unit/framework/rbac/PgSQLManagerTest.php rename to tests/framework/rbac/PgSQLManagerTest.php diff --git a/tests/unit/framework/rbac/PhpManagerTest.php b/tests/framework/rbac/PhpManagerTest.php similarity index 100% rename from tests/unit/framework/rbac/PhpManagerTest.php rename to tests/framework/rbac/PhpManagerTest.php diff --git a/tests/unit/framework/rbac/SqliteManagerTest.php b/tests/framework/rbac/SqliteManagerTest.php similarity index 100% rename from tests/unit/framework/rbac/SqliteManagerTest.php rename to tests/framework/rbac/SqliteManagerTest.php diff --git a/tests/unit/framework/requirements/YiiRequirementCheckerTest.php b/tests/framework/requirements/YiiRequirementCheckerTest.php similarity index 98% rename from tests/unit/framework/requirements/YiiRequirementCheckerTest.php rename to tests/framework/requirements/YiiRequirementCheckerTest.php index 6fbf13b..f603dfb 100644 --- a/tests/unit/framework/requirements/YiiRequirementCheckerTest.php +++ b/tests/framework/requirements/YiiRequirementCheckerTest.php @@ -1,6 +1,6 @@ run(); diff --git a/tests/web/app/protected/config/main.php b/tests/web/app/protected/config/main.php deleted file mode 100644 index 0b67a5f..0000000 --- a/tests/web/app/protected/config/main.php +++ /dev/null @@ -1,3 +0,0 @@ - 'item 1', - 'value 2' => 'item 2', - 'value 3' => 'item 3', - ], isset($_POST['test']) ? $_POST['test'] : null, - function ($index, $label, $name, $value, $checked) { - return Html::label( - $label . ' ' . Html::checkbox($name, $value, $checked), - null, ['class' => 'inline checkbox'] - ); - }); - echo Html::submitButton(); - echo Html::endForm(); - print_r($_POST); - } -} diff --git a/tests/web/app/protected/runtime/.gitignore b/tests/web/app/protected/runtime/.gitignore deleted file mode 100644 index 72e8ffc..0000000 --- a/tests/web/app/protected/runtime/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/tests/web/app/protected/views/site/index.php b/tests/web/app/protected/views/site/index.php deleted file mode 100644 index cc86af6..0000000 --- a/tests/web/app/protected/views/site/index.php +++ /dev/null @@ -1,8 +0,0 @@ -