You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
886 B

<?php
error_reporting(-1);
define('YII_ENABLE_ERROR_HANDLER', false);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
Yii::setAlias('@tests', __DIR__);
new \yii\console\Application([
'id' => 'unit',
'basePath' => __DIR__,
'vendorPath' => dirname(__DIR__) . '/vendor',
// 'bootstrap' => ['log'],
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'sqlite::memory:',
],
// 'log' => [
// 'targets' => [
// [
// 'class' => 'yii\log\FileTarget',
// 'categories' => ['yii\db\*', 'lhs\Yii2SaveRelationsBehavior\*']
// ],
// ]
// ],
]
]);