Add dotenv file for testing

This commit is contained in:
printempw 2017-11-09 12:09:41 +08:00
parent fc83b1ba0a
commit ef7f75b184
2 changed files with 36 additions and 1 deletions

35
.env.testing Normal file
View File

@ -0,0 +1,35 @@
###################################
# Blessing Skin Server V3 #
# Testing Configuration #
###################################
APP_DEBUG = true
APP_ENV = testing
DB_CONNECTION = mysql
# Connect to MySQL server via TCP/IP instead of Unix Domain Socket
DB_HOST = 127.0.0.1
DB_PORT = 3306
DB_DATABASE = test
DB_USERNAME = root
DB_PASSWORD = root
DB_PREFIX = null
PWD_METHOD = PHP_PASSWORD_HASH
SALT = 2c5ca184f017a9a1ffbd198ef69b0c0e
APP_KEY = base64:gkb/zouNF6UOSfnr/o+izVMS57WQS3+62YqZBuDyBhU=
MAIL_DRIVER = smtp
MAIL_HOST = null
MAIL_PORT = 465
MAIL_USERNAME = null
MAIL_PASSWORD = null
MAIL_ENCRYPTION = ssl
CACHE_DRIVER = file
SESSION_DRIVER = file
QUEUE_DRIVER = sync
REDIS_HOST = 127.0.0.1
REDIS_PASSWORD = null
REDIS_PORT = 6379

View File

@ -20,7 +20,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
Artisan::call('migrate'); Artisan::call('migrate:refresh');
$_SERVER['REMOTE_ADDR'] = '127.0.0.1'; $_SERVER['REMOTE_ADDR'] = '127.0.0.1';