Browse Source

fixed unit test config.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
872ade6f5e
  1. 0
      apps/basic/tests/unit.suite.yml
  2. 5
      apps/basic/tests/unit/_bootstrap.php
  3. 17
      apps/basic/tests/unit/_config.php

0
apps/basic/tests/unit.suite.dist.yml → apps/basic/tests/unit.suite.yml

5
apps/basic/tests/unit/_bootstrap.php

@ -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
apps/basic/tests/unit/_config.php

@ -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…
Cancel
Save