Skip to content

Commit

Permalink
Finish memory to save value to db and refresh cache if needed. #9
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Dec 15, 2019
1 parent d1b1413 commit bb251a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Console/ConfigureMailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public function handle(Foundation $foundation)
$updater($name, $email);
});

$memory->finish();

return 0;
}
}
3 changes: 2 additions & 1 deletion tests/Feature/Console/ConfigureMailCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public function it_cant_sync_configuration_when_orchestra_is_installed()
$memory->shouldReceive('get')->once()->with('email.from.name')->andReturn('Orchestra Platform')
->shouldReceive('get')->once()->with('email.from.address')->andReturn('hello@orchestraplatform.com')
->shouldReceive('put')->once()->with('email', ['driver' => 'smtp', 'host' => 'smtp.mailgun.org', 'port' => 587, 'encryption' => 'tls', 'sendmail' => '/usr/sbin/sendmail -bs'])->andReturnNull()
->shouldReceive('put')->once()->with('email.from', ['name' => 'The Application', 'address' => 'crynobone@gmail.com'])->andReturnNull();
->shouldReceive('put')->once()->with('email.from', ['name' => 'The Application', 'address' => 'crynobone@gmail.com'])->andReturnNull()
->shouldReceive('finish')->once()->andReturn(true);

$this->artisan('orchestra:configure-email')
->expectsQuestion('What is the application name?', 'The Application')
Expand Down

0 comments on commit bb251a1

Please sign in to comment.