2013-12-02 19:25:21 +08:00
|
|
|
<?php
|
2013-12-03 15:07:36 +08:00
|
|
|
|
2013-12-29 04:04:08 +08:00
|
|
|
// the entry script URL (without host info) for functional and acceptance tests
|
|
|
|
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
|
2014-08-15 07:30:47 +08:00
|
|
|
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/index-test.php');
|
2013-12-29 04:04:08 +08:00
|
|
|
|
|
|
|
// the entry script file path for functional and acceptance tests
|
2014-08-15 07:30:47 +08:00
|
|
|
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(dirname(__DIR__)) . '/web/index-test.php');
|
2013-12-29 04:04:08 +08:00
|
|
|
|
2013-12-17 07:27:33 +08:00
|
|
|
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
2013-12-29 04:04:08 +08:00
|
|
|
|
2013-12-17 07:27:33 +08:00
|
|
|
defined('YII_ENV') or define('YII_ENV', 'test');
|
|
|
|
|
2014-08-15 07:30:47 +08:00
|
|
|
require_once(__DIR__ . '/../../vendor/autoload.php');
|
2013-12-29 04:04:08 +08:00
|
|
|
|
2014-08-15 07:30:47 +08:00
|
|
|
require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
|
2013-12-17 07:27:33 +08:00
|
|
|
|
2013-12-29 04:04:08 +08:00
|
|
|
// set correct script paths
|
|
|
|
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
|
|
|
|
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
|
2014-02-27 22:37:34 +08:00
|
|
|
$_SERVER['SERVER_NAME'] = 'localhost';
|
2013-12-29 04:04:08 +08:00
|
|
|
|
2014-08-15 07:30:47 +08:00
|
|
|
Yii::setAlias('@codeception', __DIR__);
|