From ef7f75b184e9c14d20b74b117ffcac62d67d3e45 Mon Sep 17 00:00:00 2001 From: printempw Date: Thu, 9 Nov 2017 12:09:41 +0800 Subject: [PATCH] Add dotenv file for testing --- .env.testing | 35 +++++++++++++++++++++++++++++++++++ tests/TestCase.php | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .env.testing diff --git a/.env.testing b/.env.testing new file mode 100644 index 00000000..a64b7da4 --- /dev/null +++ b/.env.testing @@ -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 diff --git a/tests/TestCase.php b/tests/TestCase.php index 817d443a..667b7f9f 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -20,7 +20,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); - Artisan::call('migrate'); + Artisan::call('migrate:refresh'); $_SERVER['REMOTE_ADDR'] = '127.0.0.1';