fixed unit test config.

This commit is contained in:
Qiang Xue 2013-12-29 16:25:22 -05:00
parent c09c67c13c
commit 749d72c33b
3 changed files with 18 additions and 4 deletions

View File

@ -2,7 +2,4 @@
// add unit testing specific bootstrap code here
yii\codeception\TestCase::$appConfig = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../../config/web.php'),
require(__DIR__ . '/../../config/codeception/unit.php')
);
yii\codeception\TestCase::$appConfig = require(__DIR__ . '/_config.php');

17
tests/unit/_config.php Normal file
View File

@ -0,0 +1,17 @@
<?php
use yii\helpers\ArrayHelper;
$config = require(__DIR__ . '/../../config/web.php');
return ArrayHelper::merge($config, [
'components' => [
'fixture' => [
'class' => 'yii\test\DbFixtureManager',
'basePath' => '@tests/unit/fixtures',
],
'db' => [
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_unit',
],
],
]);