From fc4c2d5479cb5a17f29bef33c7a80f4cdd8831d9 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 2 Dec 2013 15:23:32 +0400 Subject: [PATCH] codeception configs, web config modifed for db-settings --- config/codeception/acceptance.php | 3 +++ config/codeception/functional.php | 3 +++ config/codeception/unit.php | 13 +++++++++++++ config/web.php | 11 +++++++++++ 4 files changed, 30 insertions(+) create mode 100644 config/codeception/acceptance.php create mode 100644 config/codeception/functional.php create mode 100644 config/codeception/unit.php diff --git a/config/codeception/acceptance.php b/config/codeception/acceptance.php new file mode 100644 index 0000000..0b67a5f --- /dev/null +++ b/config/codeception/acceptance.php @@ -0,0 +1,3 @@ + [ + 'fixture' => [ + 'class' => 'yii\test\DbFixtureManager', + 'basePath' => '@app/tests/unit/fixtures', + ], + 'db' => [ + 'dsn' => 'mysql:host=localhost;dbname=yii2basic_unit', + ], + ], +]; diff --git a/config/web.php b/config/web.php index 6124c4f..a5f7b75 100644 --- a/config/web.php +++ b/config/web.php @@ -1,5 +1,9 @@ 'basic', 'basePath' => dirname(__DIR__), @@ -26,6 +30,13 @@ $config = [ ], ], ], + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=localhost;dbname=yii2basic', + 'username' => 'root', + 'password' => '', + 'charset' => 'utf8', + ], ], 'params' => $params, ];