Skip to content

Commit d40fbd9

Browse files
committed
Issue #25434 Add Unit Test for this case
1 parent bd44b0b commit d40fbd9

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Framework\Mail\Test\Unit;
7+
8+
use Magento\Framework\Mail\Address;
9+
use PHPUnit\Framework\TestCase;
10+
11+
/**
12+
* test Magento\Framework\Mail\Address
13+
*/
14+
class AddressTest extends TestCase
15+
{
16+
/**
17+
* @var Address
18+
*/
19+
protected $message;
20+
21+
/**
22+
* Address object with nullable email parameter passed should not throw an exception.
23+
*
24+
* @return void
25+
*/
26+
public function testGetEmailEmpty()
27+
{
28+
$address = new Address(null, "Test name");
29+
$this->assertNull($address->getEmail());
30+
}
31+
}

0 commit comments

Comments
 (0)