Qiang Xue
11 years ago
6 changed files with 58 additions and 48 deletions
@ -0,0 +1,11 @@ |
|||||||
|
<?php |
||||||
|
/** |
||||||
|
* application configurations shared by all test types |
||||||
|
*/ |
||||||
|
return [ |
||||||
|
'components' => [ |
||||||
|
'mail' => [ |
||||||
|
'useFileTransport' => true, |
||||||
|
], |
||||||
|
], |
||||||
|
]; |
@ -1,16 +1,19 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
use yii\helpers\ArrayHelper; |
return yii\helpers\ArrayHelper::merge( |
||||||
|
require(__DIR__ . '/../../config/web.php'), |
||||||
$config = require(__DIR__ . '/../../config/web.php'); |
require(__DIR__ . '/../_config.php'), |
||||||
|
[ |
||||||
return ArrayHelper::merge($config, [ |
'components' => [ |
||||||
'components' => [ |
'db' => [ |
||||||
'db' => [ |
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_acceptance', |
||||||
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_acceptance', |
], |
||||||
], |
'mail' => [ |
||||||
'urlManager' => [ |
'useFileTransport' => true, |
||||||
'showScriptName' => true, |
], |
||||||
|
'urlManager' => [ |
||||||
|
'showScriptName' => true, |
||||||
|
], |
||||||
], |
], |
||||||
], |
] |
||||||
]); |
); |
||||||
|
@ -1,20 +1,23 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
use yii\helpers\ArrayHelper; |
|
||||||
|
|
||||||
// set correct script paths |
// set correct script paths |
||||||
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE; |
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE; |
||||||
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL; |
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL; |
||||||
|
|
||||||
$config = require(__DIR__ . '/../../config/web.php'); |
return yii\helpers\ArrayHelper::merge( |
||||||
|
require(__DIR__ . '/../../config/web.php'), |
||||||
return ArrayHelper::merge($config, [ |
require(__DIR__ . '/../_config.php'), |
||||||
'components' => [ |
[ |
||||||
'db' => [ |
'components' => [ |
||||||
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_functional', |
'db' => [ |
||||||
], |
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_functional', |
||||||
'urlManager' => [ |
], |
||||||
'showScriptName' => true, |
'mail' => [ |
||||||
|
'useFileTransport' => true, |
||||||
|
], |
||||||
|
'urlManager' => [ |
||||||
|
'showScriptName' => true, |
||||||
|
], |
||||||
], |
], |
||||||
], |
] |
||||||
]); |
); |
||||||
|
@ -1,17 +1,17 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
use yii\helpers\ArrayHelper; |
return yii\helpers\ArrayHelper::merge( |
||||||
|
require(__DIR__ . '/../../config/web.php'), |
||||||
$config = require(__DIR__ . '/../../config/web.php'); |
require(__DIR__ . '/../_config.php'), |
||||||
|
[ |
||||||
return ArrayHelper::merge($config, [ |
'components' => [ |
||||||
'components' => [ |
'fixture' => [ |
||||||
'fixture' => [ |
'class' => 'yii\test\DbFixtureManager', |
||||||
'class' => 'yii\test\DbFixtureManager', |
'basePath' => '@tests/unit/fixtures', |
||||||
'basePath' => '@tests/unit/fixtures', |
], |
||||||
], |
'db' => [ |
||||||
'db' => [ |
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_unit', |
||||||
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_unit', |
], |
||||||
], |
], |
||||||
], |
] |
||||||
]); |
); |
||||||
|
Loading…
Reference in new issue