mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-25 03:01:21 +08:00
Use config variables instead constants. Cleanup redundant constants
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
<?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', '/advanced/backend/web/index-test.php');
|
||||
|
||||
// the entry script file path for functional and acceptance tests
|
||||
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
@@ -18,6 +11,8 @@ require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
|
||||
require(__DIR__ . '/../../common/config/aliases.php');
|
||||
|
||||
// set correct script paths
|
||||
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
|
||||
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
|
||||
|
||||
// the entry script file path for functional and acceptance tests
|
||||
$_SERVER['SCRIPT_FILENAME'] = dirname(__DIR__) . '/web/index-test.php';
|
||||
$_SERVER['SCRIPT_NAME'] = \Codeception\Configuration::config()['config']['test_entry_url'];
|
||||
$_SERVER['SERVER_NAME'] = 'localhost';
|
||||
|
||||
Reference in New Issue
Block a user