6 changed files with 58 additions and 48 deletions
			
			
		@ -0,0 +1,11 @@
					 | 
				
			||||
<?php | 
				
			||||
/** | 
				
			||||
 * application configurations shared by all test types | 
				
			||||
 */ | 
				
			||||
return [ | 
				
			||||
	'components' => [ | 
				
			||||
		'mail' => [ | 
				
			||||
			'useFileTransport' => true, | 
				
			||||
		], | 
				
			||||
	], | 
				
			||||
]; | 
				
			||||
@ -1,16 +1,19 @@
					 | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use yii\helpers\ArrayHelper; | 
				
			||||
 | 
				
			||||
$config = require(__DIR__ . '/../../config/web.php'); | 
				
			||||
 | 
				
			||||
return ArrayHelper::merge($config, [ | 
				
			||||
	'components' => [ | 
				
			||||
		'db' => [ | 
				
			||||
			'dsn' => 'mysql:host=localhost;dbname=yii2_basic_acceptance', | 
				
			||||
		], | 
				
			||||
		'urlManager' => [ | 
				
			||||
			'showScriptName' => true, | 
				
			||||
return yii\helpers\ArrayHelper::merge( | 
				
			||||
	require(__DIR__ . '/../../config/web.php'), | 
				
			||||
	require(__DIR__ . '/../_config.php'), | 
				
			||||
	[ | 
				
			||||
		'components' => [ | 
				
			||||
			'db' => [ | 
				
			||||
				'dsn' => 'mysql:host=localhost;dbname=yii2_basic_acceptance', | 
				
			||||
			], | 
				
			||||
			'mail' => [ | 
				
			||||
				'useFileTransport' => true, | 
				
			||||
			], | 
				
			||||
			'urlManager' => [ | 
				
			||||
				'showScriptName' => true, | 
				
			||||
			], | 
				
			||||
		], | 
				
			||||
	], | 
				
			||||
]); | 
				
			||||
	] | 
				
			||||
); | 
				
			||||
					 | 
				
			||||
@ -1,20 +1,23 @@
					 | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
use yii\helpers\ArrayHelper; | 
				
			||||
 | 
				
			||||
// set correct script paths | 
				
			||||
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE; | 
				
			||||
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL; | 
				
			||||
 | 
				
			||||
$config = require(__DIR__ . '/../../config/web.php'); | 
				
			||||
 | 
				
			||||
return ArrayHelper::merge($config, [ | 
				
			||||
	'components' => [ | 
				
			||||
		'db' => [ | 
				
			||||
			'dsn' => 'mysql:host=localhost;dbname=yii2_basic_functional', | 
				
			||||
		], | 
				
			||||
		'urlManager' => [ | 
				
			||||
			'showScriptName' => true, | 
				
			||||
return yii\helpers\ArrayHelper::merge( | 
				
			||||
	require(__DIR__ . '/../../config/web.php'), | 
				
			||||
	require(__DIR__ . '/../_config.php'), | 
				
			||||
	[ | 
				
			||||
		'components' => [ | 
				
			||||
			'db' => [ | 
				
			||||
				'dsn' => 'mysql:host=localhost;dbname=yii2_basic_functional', | 
				
			||||
			], | 
				
			||||
			'mail' => [ | 
				
			||||
				'useFileTransport' => true, | 
				
			||||
			], | 
				
			||||
			'urlManager' => [ | 
				
			||||
				'showScriptName' => true, | 
				
			||||
			], | 
				
			||||
		], | 
				
			||||
	], | 
				
			||||
]); | 
				
			||||
	] | 
				
			||||
); | 
				
			||||
					 | 
				
			||||
@ -1,17 +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', | 
				
			||||
return yii\helpers\ArrayHelper::merge( | 
				
			||||
	require(__DIR__ . '/../../config/web.php'), | 
				
			||||
	require(__DIR__ . '/../_config.php'), | 
				
			||||
	[ | 
				
			||||
		'components' => [ | 
				
			||||
			'fixture' => [ | 
				
			||||
				'class' => 'yii\test\DbFixtureManager', | 
				
			||||
				'basePath' => '@tests/unit/fixtures', | 
				
			||||
			], | 
				
			||||
			'db' => [ | 
				
			||||
				'dsn' => 'mysql:host=localhost;dbname=yii2_basic_unit', | 
				
			||||
			], | 
				
			||||
		], | 
				
			||||
	], | 
				
			||||
]); | 
				
			||||
	] | 
				
			||||
); | 
				
			||||
					 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue