8000 minor #59115 [Mailer] add test covering null regions (klaussilveira) · symfony/symfony@dcf824a · GitHub
[go: up one dir, main page]

Skip to content

Commit dcf824a

Browse files
minor #59115 [Mailer] add test covering null regions (klaussilveira)
This PR was merged into the 7.2 branch. Discussion ---------- [Mailer] add test covering null regions | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT even if the fix in #59102 was a duplicate of #59099 having the test IMO is still a good idea Commits ------- 91f4a2c add test covering null regions
2 parents 13de120 + 91f4a2c commit dcf824a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Mailer\Bridge\Sendgrid\Tests\Transport;
13+
14+
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridSmtpTransport;
16+
17+
class SendgridSmtpTransportTest extends TestCase
18+
{
19+
/**
20+
* @dataProvider getTransportData
21+
*/
22+
public function testToString(SendgridSmtpTransport $transport, string $expected)
23+
{
24+
$this->assertSame($expected, (string) $transport);
25+
}
26+
27+
public static function getTransportData()
28+
{
29+
return [
30+
[
31+
new SendgridSmtpTransport('KEY'),
32+
'smtps://smtp.sendgrid.net',
33+
],
34+
[
35+
new SendgridSmtpTransport('KEY', null, null, 'eu'),
36+
'smtps://smtp.eu.sendgrid.net',
37+
],
38+
];
39+
}
40+
}

0 commit comments

Comments
 (0)
2A8D
0