1 <?php declare(strict_types=1);
19 'Username Addresses' => [
20 'phpunit@' . self::DEFAULT_HOST .
',phpunit',
32 'Email Addresses with Umlauts' => [
33 'phpünit@ilias.de,phpnitü@ilias.de,üphpnit@iliäs.de',
40 'Trailing Dot in Local Part of Email Address' => [
46 'Mailing List Address' => [
58 'Local Role Address' => [
64 'Course Role Address With Role Names for Course and Role' => [
65 '#member@[French Course]',
70 'Course Role Recipient with Course Role Address (Role Names for Course and Role)' => [
71 'Course Administrator <#admin@[Math Course]>',
76 'Course Role Recipient with Course Role Address (Numeric Id for Course Role)' => [
77 'Course Administrator <#il_crs_admin_2581>',
91 'Trailing Quote in Local Part' => [
94 'Trailing Quote in Local Part of Email Address' => [
107 if (!function_exists(
'imap_rfc822_parse_adrlist')) {
108 $this->markTestSkipped(
'Skipped test, imap extension required');
112 $parsedAddresses =
$parser->parse();
114 $this->assertCount(count($expected), $parsedAddresses);
115 $this->assertEquals($expected, $parsedAddresses);
126 $parsedAddresses =
$parser->parse();
128 $this->assertCount(count($expected), $parsedAddresses);
129 $this->assertEquals($expected, $parsedAddresses);
138 $this->expectException(ilMailException::class);
149 $wrappedParser = $this->getMockBuilder(ilBaseMailRfc822AddressParser::class)
150 ->setConstructorArgs([
'phpunit',
'ilias'])
152 $wrappedParser->expects($this->once())->method(
'parse');
Class ilMailPearRfc822WrapperAddressParser.
testPearAddressParser(string $addresses, array $expected)
Class ilMailRfc822AddressParser.
testBuiltInAddressParser(string $addresses, array $expected)
Class ilMailImapRfc822AddressParser.
testExceptionShouldBeRaisedIfEmailCannotBeParsedWithPearAddressParser(string $addresses)
emailInvalidAddressesProvider
Class ilMailAddressParserTest.
emailInvalidAddressesProvider()
testWrappingParserDelegatesParsingToAggregatedParser()