mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-06 07:24:44 +01:00
Codeception test adjustments for basic and advanced applications
- Moved everything test-related into `tests` directory. Codeception tests are in `codeception`. - Removed database module since we're using fixtures and migrations. - Moved console entry points and bootstrap into `tests/codeception/bin`. - Adjusted travis build scripts. - Adjusted documentation to be consistent and reflect changes made.
This commit is contained in:
23
apps/basic/tests/codeception/_bootstrap.php
Normal file
23
apps/basic/tests/codeception/_bootstrap.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// the entry script URL (without host info) for functional and acceptance tests
|
||||
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
|
||||
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/index-test.php');
|
||||
|
||||
// the entry script file path for functional and acceptance tests
|
||||
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(dirname(__DIR__)) . '/web/index-test.php');
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require_once(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
|
||||
|
||||
// set correct script paths
|
||||
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
|
||||
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
|
||||
$_SERVER['SERVER_NAME'] = 'localhost';
|
||||
|
||||
Yii::setAlias('@codeception', __DIR__);
|
||||
Reference in New Issue
Block a user