ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilGroupNameAsMailValidatorTest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
10 {
15  {
16  $validator = new \ilGroupNameAsMailValidator('someHost', function (string $groupName) {
17  return true;
18  });
19 
20  $this->assertTrue($validator->validate(new ilMailAddress('phpunit', 'someHost')));
21  }
22 
27  {
28  $validator = new \ilGroupNameAsMailValidator('someHost', function (string $groupName) {
29  return false;
30  });
31 
32  $this->assertFalse($validator->validate(new ilMailAddress('someHost', 'someHost')));
33  }
34 }
Class ilMailBaseTest.
Class ilGroupNameAsMailValidatorTest.
Class ilMailAddress.