ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilGroupNameAsMailValidatorTest Class Reference

Class ilGroupNameAsMailValidatorTest. More...

+ Inheritance diagram for ilGroupNameAsMailValidatorTest:
+ Collaboration diagram for ilGroupNameAsMailValidatorTest:

Public Member Functions

 testGroupIsDetectedIfGroupNameExists ()
 
 testGroupIsNotDetectedIfGroupNameDoesNotExists ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilMailBaseTest
 setUp ()
 
 setGlobalVariable ($name, $value)
 
 assertException ($exception_class)
 

Detailed Description

Member Function Documentation

◆ testGroupIsDetectedIfGroupNameExists()

ilGroupNameAsMailValidatorTest::testGroupIsDetectedIfGroupNameExists ( )

Definition at line 14 of file ilGroupNameAsMailValidatorTest.php.

15  {
16  $validator = new \ilGroupNameAsMailValidator('someHost', function (string $groupName) {
17  return true;
18  });
19 
20  $this->assertTrue($validator->validate(new ilMailAddress('phpunit', 'someHost')));
21  }
Class ilMailAddress.

◆ testGroupIsNotDetectedIfGroupNameDoesNotExists()

ilGroupNameAsMailValidatorTest::testGroupIsNotDetectedIfGroupNameDoesNotExists ( )

Definition at line 26 of file ilGroupNameAsMailValidatorTest.php.

27  {
28  $validator = new \ilGroupNameAsMailValidator('someHost', function (string $groupName) {
29  return false;
30  });
31 
32  $this->assertFalse($validator->validate(new ilMailAddress('someHost', 'someHost')));
33  }
Class ilMailAddress.

The documentation for this class was generated from the following file: