19 declare(strict_types=1);
35 'Username Addresses' => [
36 'phpunit@' . self::DEFAULT_HOST .
',phpunit',
48 'Email Addresses with Umlauts' => [
49 'phpünit@ilias.de,phpnitü@ilias.de,üphpnit@iliäs.de',
56 'Trailing Dot in Local Part of Email Address' => [
62 'Mailing List Address' => [
74 'Local Role Address' => [
80 'Course Role Address With Role Names for Course and Role' => [
81 '#member@[French Course]',
86 'Course Role Recipient with Course Role Address (Role Names for Course and Role)' => [
87 'Course Administrator <#admin@[Math Course]>',
92 'Course Role Recipient with Course Role Address (Numeric Id for Course Role)' => [
93 'Course Administrator <#il_crs_admin_2581>',
98 'sepp@some.where;done@web.de' => [
100 'sepp@some.where;done@web.de',
115 'Trailing Quote in Local Part' => [
118 'Trailing Quote in Local Part of Email Address' => [
129 if (!function_exists(
'imap_rfc822_parse_adrlist')) {
130 $this->markTestSkipped(
'Skipped test, imap extension required');
134 $parsedAddresses = $parser->parse();
136 $this->assertCount(count($expected), $parsedAddresses);
137 $this->assertEquals($expected, $parsedAddresses);
146 $parsedAddresses = $parser->parse();
148 $this->assertEquals($expected, $parsedAddresses);
149 $this->assertCount(count($expected), $parsedAddresses);
155 $parsedAddresses = $parser->parse();
157 $this->assertCount(0, $parsedAddresses);
165 $this->expectException(ilMailException::class);
176 $wrappedParser = $this->getMockBuilder(ilBaseMailRfc822AddressParser::class)
177 ->setConstructorArgs([
'phpunit',
'ilias'])
179 $wrappedParser->expects($this->once())->method(
'parse');
Class ilMailPearRfc822WrapperAddressParser.
testPearAddressParser(string $addresses, array $expected)
emailAddressesProvider
Class ilMailRfc822AddressParser.
testBuiltInAddressParser(string $addresses, array $expected)
emailAddressesProvider
Class ilMailImapRfc822AddressParser.
testExceptionShouldBeRaisedIfEmailCannotBeParsedWithPearAddressParser(string $addresses)
emailInvalidAddressesProvider
Class ilMailAddressParserTest.
testAddressParserReturnsEmptyListIfAnEmptyAddressStringIsGiven()
static emailInvalidAddressesProvider()
static emailAddressesProvider()
testWrappingParserDelegatesParsingToAggregatedParser()