use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Header\Headers;
use Symfony\Component\Mime\Header\PathHeader;
use Symfony\Component\Mime\Message;
use Symfony\Component\Mime\RawMessage;
class EnvelopeTest extends TestCase
{ public function testConstructorWithAddressSender() { $e =
new Envelope(new Address('fabien@symfony.com'
),
[new Address('thomas@symfony.com'
)]);
$this->
assertEquals(new Address('fabien@symfony.com'
),
$e->
getSender());
} public function testConstructorWithAddressSenderAndNonAsciiCharactersInLocalPartOfAddress() { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('Invalid sender "fabièn@symfony.com": non-ASCII characters not supported in local-part of email.'
);
new Envelope(new Address('fabièn@symfony.com'
),
[new Address('thomas@symfony.com'
)]);
} public function testConstructorWithNamedAddressSender() {