Skip to content

Commit 85eb258

Browse files
klaussilveiraxabbuh
authored andcommitted
add test covering null regions
1 parent 11a8de6 commit 85eb258

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
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 <[email protected]>
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)