From 303b64ced113d70dd2d55f637ae9ebd138a3add7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 17 Feb 2018 13:00:11 -0600 Subject: [PATCH] Fix improperly named mailgun environment variable, closes #942 --- app/Console/Commands/Environment/EmailSettingsCommand.php | 2 +- .../Unit/Commands/Environment/EmailSettingsCommandTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/Environment/EmailSettingsCommand.php b/app/Console/Commands/Environment/EmailSettingsCommand.php index 61b922b76..0403d7f11 100644 --- a/app/Console/Commands/Environment/EmailSettingsCommand.php +++ b/app/Console/Commands/Environment/EmailSettingsCommand.php @@ -126,7 +126,7 @@ class EmailSettingsCommand extends Command trans('command/messages.environment.mail.ask_mailgun_domain'), $this->config->get('services.mailgun.domain') ); - $this->variables['MAILGUN_KEY'] = $this->option('password') ?? $this->ask( + $this->variables['MAILGUN_SECRET'] = $this->option('password') ?? $this->ask( trans('command/messages.environment.mail.ask_mailgun_secret'), $this->config->get('services.mailgun.secret') ); } diff --git a/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php b/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php index 1be2e50cb..3b6865c45 100644 --- a/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php +++ b/tests/Unit/Commands/Environment/EmailSettingsCommandTest.php @@ -126,7 +126,7 @@ class EmailSettingsCommandTest extends CommandTestCase $data = [ 'MAIL_DRIVER' => 'mailgun', 'MAILGUN_DOMAIN' => 'domain.com', - 'MAILGUN_KEY' => '123456', + 'MAILGUN_SECRET' => '123456', 'MAIL_FROM' => 'mail@from.com', 'MAIL_FROM_NAME' => 'MailName', 'MAIL_ENCRYPTION' => 'tls', @@ -147,7 +147,7 @@ class EmailSettingsCommandTest extends CommandTestCase $data = [ 'MAIL_DRIVER' => 'mailgun', 'MAILGUN_DOMAIN' => 'domain.com', - 'MAILGUN_KEY' => '123456', + 'MAILGUN_SECRET' => '123456', 'MAIL_FROM' => 'mail@from.com', 'MAIL_FROM_NAME' => 'MailName', 'MAIL_ENCRYPTION' => 'tls', @@ -160,7 +160,7 @@ class EmailSettingsCommandTest extends CommandTestCase '--from' => $data['MAIL_FROM_NAME'], '--encryption' => $data['MAIL_ENCRYPTION'], '--host' => $data['MAILGUN_DOMAIN'], - '--password' => $data['MAILGUN_KEY'], + '--password' => $data['MAILGUN_SECRET'], ]); $this->assertNotEmpty($display);