Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[10.x] Add 'Roundrobin' Symfony mailer transport driver (#49435)
* add roundrobin symfony mailer transport driver * add test for roundrobin transport driver * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> --------- Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> Co-authored-by: Mior Muhammad Zaki <crynobone@gmail.com>
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Illuminate\Tests\Integration\Mail; | ||
|
||
use Orchestra\Testbench\Attributes\WithConfig; | ||
use Orchestra\Testbench\TestCase; | ||
use Symfony\Component\Mailer\Transport\RoundRobinTransport; | ||
|
||
class MailRoundRobinTransportTest extends TestCase | ||
{ | ||
#[WithConfig('mail.default', 'roundrobin')] | ||
#[WithConfig('mail.mailers.roundrobin', ['transport' => 'roundrobin', 'mailers' => ['sendmail', 'array']])] | ||
public function testGetRoundRobinTransportWithConfiguredTransports() | ||
{ | ||
$transport = app('mailer')->getSymfonyTransport(); | ||
$this->assertInstanceOf(RoundRobinTransport::class, $transport); | ||
} | ||
|
||
#[WithConfig('mail.driver', 'roundrobin')] | ||
#[WithConfig('mail.mailers', ['sendmail', 'array'])] | ||
#[WithConfig('mail.sendmail', '/usr/sbin/sendmail -bs')] | ||
public function testGetRoundRobinTransportWithLaravel6StyleMailConfiguration() | ||
{ | ||
$transport = app('mailer')->getSymfonyTransport(); | ||
$this->assertInstanceOf(RoundRobinTransport::class, $transport); | ||
} | ||
} |