From cd7a4a6745c29721bfad364de40becd53f915f0b Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 14 Nov 2013 10:36:35 -0500 Subject: [PATCH] fixed functional test. --- apps/basic/web/index-test.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/basic/web/index-test.php b/apps/basic/web/index-test.php index 1593164..bd61e0b 100644 --- a/apps/basic/web/index-test.php +++ b/apps/basic/web/index-test.php @@ -13,5 +13,12 @@ require_once(__DIR__ . '/../vendor/yiisoft/yii2/yii/Yii.php'); $config = require(__DIR__ . '/../config/web-test.php'); -$application = new yii\web\Application($config); -$application->run(); +if (isset($this)) { + // run in functional tests + $config['class'] = 'yii\web\Application'; + return $config; +} else { + // run in acceptance tests + $application = new yii\web\Application($config); + $application->run(); +}