forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMailRoundRobinTransportTest.php
More file actions
51 lines (40 loc) · 1.42 KB
/
Copy pathMailRoundRobinTransportTest.php
File metadata and controls
51 lines (40 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
namespace Illuminate\Tests\Mail;
use Orchestra\Testbench\TestCase;
use Symfony\Component\Mailer\Transport\RoundRobinTransport;
class MailRoundRobinTransportTest extends TestCase
{
public function testGetRoundRobinTransportWithConfiguredTransports(): void
{
$this->app['config']->set('mail.default', 'roundrobin');
$this->app['config']->set('mail.mailers', [
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'sendmail',
'array',
],
],
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
'array' => [
'transport' => 'array',
],
]);
$transport = app('mailer')->getSymfonyTransport();
$this->assertInstanceOf(RoundRobinTransport::class, $transport);
}
public function testGetRoundRobinTransportWithLaravel6StyleMailConfiguration(): void
{
$this->app['config']->set('mail.driver', 'roundrobin');
$this->app['config']->set('mail.mailers', [
'sendmail',
'array',
]);
$this->app['config']->set('mail.sendmail', '/usr/sbin/sendmail -bs');
$transport = app('mailer')->getSymfonyTransport();
$this->assertInstanceOf(RoundRobinTransport::class, $transport);
}
}