17 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
29 protected function setUp()
31 $this->subject = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\
TYPO3\CMS\Core\Mail\MailMessage::class);
40 'string with ascii email address' => [
41 'john.doe@example.com',
42 'john.doe@example.com'
44 'string with utf8 email address' => [
45 'john.doe@☺example.com',
46 'john.doe@xn--example-tc7d.com'
59 $this->subject->setReturnPath($address);
61 $this->assertSame($expected, $this->subject->getReturnPath());
70 'string with ascii email address' => [
71 'john.doe@example.com',
73 'john.doe@example.com' =>
null,
76 'string with utf8 email address' => [
77 'john.doe@☺example.com',
79 'john.doe@xn--example-tc7d.com' =>
null,
93 $this->subject->setSender($address);
95 $this->assertSame($expected, $this->subject->getSender());
104 'string with ascii email address' => [
105 'john.doe@example.com',
107 'john.doe@example.com' => null
110 'string with utf8 email address' => [
111 'john.doe@☺example.com',
113 'john.doe@xn--example-tc7d.com' => null
116 'array with ascii email addresses' => [
118 'john.doe@example.com' =>
'John Doe',
119 'jane.doe@example.com'
122 'john.doe@example.com' =>
'John Doe',
123 'jane.doe@example.com' =>
null,
126 'array with utf8 email addresses' => [
128 'john.doe@☺example.com' =>
'John Doe',
129 'jane.doe@äöu.com' =>
'Jane Doe',
132 'john.doe@xn--example-tc7d.com' =>
'John Doe',
133 'jane.doe@xn--u-zfa8c.com' =>
'Jane Doe',
136 'array with mixed email addresses' => [
138 'john.doe@☺example.com' =>
'John Doe',
139 'jane.doe@example.com' =>
'Jane Doe',
142 'john.doe@xn--example-tc7d.com' =>
'John Doe',
143 'jane.doe@example.com' =>
'Jane Doe',
157 $this->subject->setFrom($addresses);
159 $this->assertSame($expected, $this->subject->getFrom());
170 $this->subject->setReplyTo($addresses);
172 $this->assertSame($expected, $this->subject->getReplyTo());
183 $this->subject->setTo($addresses);
185 $this->assertSame($expected, $this->subject->getTo());
196 $this->subject->setCc($addresses);
198 $this->assertSame($expected, $this->subject->getCc());
209 $this->subject->setBcc($addresses);
211 $this->assertSame($expected, $this->subject->getBcc());
222 $this->subject->setReadReceiptTo($addresses);
224 $this->assertSame($expected, $this->subject->getReadReceiptTo());