Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple email addresses (#74)
* Add possibility to use multiple email addresses * Add test case for email list Co-authored-by: Stefan Damjanovic <>
- Loading branch information
1 parent
fca549e
commit bac1329
Showing
4 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Spatie\FailedJobMonitor\Test; | ||
|
||
use Spatie\FailedJobMonitor\Notifiable; | ||
|
||
class NotifiableTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function it_returns_always_list_of_emails() | ||
{ | ||
$notifiable = new Notifiable(); | ||
|
||
$this->app['config']->set('failed-job-monitor.mail.to', 'example@gmail.com'); | ||
$this->assertEquals(['example@gmail.com'], $notifiable->routeNotificationForMail()); | ||
|
||
$recipients = ['example@gmail.com', 'example2@gmail.com']; | ||
$this->app['config']->set('failed-job-monitor.mail.to', $recipients); | ||
$this->assertEquals($recipients, $notifiable->routeNotificationForMail()); | ||
} | ||
} |