فهرست منبع

Merge pull request #1759 from Ragazzo/fixtures_controller_improvements

Added to the basic app, fixed config, added to core commands.
Carsten Brandt 12 سال پیش
والد
کامیت
66b8e92540
3فایلهای تغییر یافته به همراه14 افزوده شده و 0 حذف شده
  1. 14 0
      config/console.php
  2. 0 0
      tests/unit/fixtures/.gitkeep
  3. 0 0
      tests/unit/templates/fixtures/.gitkeep

+ 14 - 0
config/console.php

@@ -1,4 +1,7 @@
 <?php
+
+Yii::setAlias('@tests', dirname(__DIR__) . '/tests');
+
 $params = require(__DIR__ . '/params.php');
 return [
 	'id' => 'basic-console',
@@ -19,6 +22,17 @@ return [
 				],
 			],
 		],
+		'db' => [
+			'class' => 'yii\db\Connection',
+			'dsn' => 'mysql:host=localhost;dbname=yii2basic',
+			'username' => 'root',
+			'password' => '',
+			'charset' => 'utf8',
+		],
+		'fixture' => [
+			'class' => 'yii\test\DbFixtureManager',
+			'basePath' => '@tests/unit/fixtures',
+		],
 	],
 	'params' => $params,
 ];

+ 0 - 0
tests/unit/fixtures/.gitkeep


+ 0 - 0
tests/unit/templates/fixtures/.gitkeep