18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
45 $str =
'This text is not longer than 76 chars and therefore will not be broken.';
47 $this->assertEquals(1, count(explode($newlineChar, $returnString)));
57 $str =
'This text is longer than 50 chars and therefore will be broken.';
59 $this->assertEquals(2, count(explode($newlineChar, $returnString)));
70 $str =
'abcdefghijklmnopqrst uvwxyz 123456';
72 $this->assertEquals($returnString,
'abcdefghijklmnopqrst' . LF .
'uvwxyz' . LF .
'123456');
80 $str =
'Mein Link auf eine News (Link: http://zzzzzzzzzzzzz.xxxxxxxxx.de/index.php?id=10&tx_ttnews%5Btt_news%5D=1&cHash=66f5af320da29b7ae1cda49047ca7358)';
82 $this->assertEquals($returnString,
'Mein Link auf eine News (Link:' . LF .
'http://zzzzzzzzzzzzz.xxxxxxxxx.de/index.php?id=10&tx_ttnews%5Btt_news%5D=1&cHash=66f5af320da29b7ae1cda49047ca7358)');
93 'name <email>' => [
'name <email@example.org>', [
'email@example.org' =>
'name']],
94 '<email>' => [
'<email@example.org>', [
'email@example.org']],
95 '@localhost' => [
'@localhost', []],
96 '000@example.com' => [
'000@example.com', [
'000@example.com']],
97 'email' => [
'email@example.org', [
'email@example.org']],
98 'email1,email2' => [
'email1@example.org,email2@example.com', [
'email1@example.org',
'email2@example.com']],
99 'name <email>,email2' => [
'name <email1@example.org>,email2@example.com', [
'email1@example.org' =>
'name',
'email2@example.com']],
100 '"last, first" <name@example.org>' => [
'"last, first" <email@example.org>', [
'email@example.org' =>
'"last, first"']],
101 'email,name <email>,"last, first" <name@example.org>' => [
102 'email1@example.org, name <email2@example.org>, "last, first" <email3@example.org>',
104 'email1@example.org',
105 'email2@example.org' =>
'name',
106 'email3@example.org' =>
'"last, first"'
119 $this->assertEquals($addressList, $returnArray);
129 [
'defaultMailReplyToAddress' =>
'noreply@example.org',
'defaultMailReplyToName' =>
''],
130 [
'noreply@example.org'],
132 'name and address' => [
133 [
'defaultMailReplyToAddress' =>
'noreply@example.org',
'defaultMailReplyToName' =>
'John Doe'],
134 [
'noreply@example.org' =>
'John Doe'],
137 [
'defaultMailReplyToAddress' =>
'',
'defaultMailReplyToName' =>
''],
140 'invalid address' => [
141 [
'defaultMailReplyToAddress' =>
'foo',
'defaultMailReplyToName' =>
''],
155 $GLOBALS[
'TYPO3_CONF_VARS'][
'MAIL'] = $configuration;
157 $this->assertSame($expectedReplyTo, $returnArray);