ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilGroupNameAsMailValidatorTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
27 {
28  public function testGroupIsDetectedIfGroupNameExists(): void
29  {
30  $validator = new ilGroupNameAsMailValidator('someHost', static function (string $groupName): bool {
31  return true;
32  });
33 
34  $this->assertTrue($validator->validate(new ilMailAddress('phpunit', 'someHost')));
35  }
36 
38  {
39  $validator = new ilGroupNameAsMailValidator('someHost', static function (string $groupName): bool {
40  return false;
41  });
42 
43  $this->assertFalse($validator->validate(new ilMailAddress('someHost', 'someHost')));
44  }
45 }
Class ilGroupNameAsMailValidator.
Class ilMailBaseTest.
Class ilGroupNameAsMailValidatorTest.
Class ilMailAddress.