fixed unit test config.
This commit is contained in:
parent
c09c67c13c
commit
749d72c33b
@ -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
17
tests/unit/_config.php
Normal 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',
|
||||
],
|
||||
],
|
||||
]);
|
Loading…
Reference in New Issue
Block a user