ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\DataProtection\test\SettingsTest Class Reference
+ Inheritance diagram for ILIAS\DataProtection\test\SettingsTest:
+ Collaboration diagram for ILIAS\DataProtection\test\SettingsTest:

Public Member Functions

 testConstruct ()
 
 testEnabled ()
 
 testValidateOnLogin ()
 
 testDeleteUserOnWithdrawal ()
 
 testAdminEmail ()
 
 testAuthMode ()
 
 testLastResetDate ()
 
 testNoAcceptance ()
 

Private Member Functions

 assertSelect (string $method, string $key, string $type)
 

Detailed Description

Definition at line 33 of file SettingsTest.php.

Member Function Documentation

◆ assertSelect()

ILIAS\DataProtection\test\SettingsTest::assertSelect ( string  $method,
string  $key,
string  $type 
)
private

Definition at line 77 of file SettingsTest.php.

References ILIAS\$setting.

Referenced by ILIAS\DataProtection\test\SettingsTest\testAdminEmail(), ILIAS\DataProtection\test\SettingsTest\testAuthMode(), ILIAS\DataProtection\test\SettingsTest\testDeleteUserOnWithdrawal(), ILIAS\DataProtection\test\SettingsTest\testEnabled(), ILIAS\DataProtection\test\SettingsTest\testLastResetDate(), ILIAS\DataProtection\test\SettingsTest\testNoAcceptance(), and ILIAS\DataProtection\test\SettingsTest\testValidateOnLogin().

77  : void
78  {
79  $setting = $this->mock(Setting::class);
80  $convert = $this->mock(Convert::class);
81 
82  $marshal = $this->mockMethod(Marshal::class, $type, [], $convert);
83 
84  $settings = $this->mock(SelectSetting::class);
85  $settings->expects(self::once())->method('typed')->willReturnCallback(function (string $k, callable $select) use ($marshal, $convert, $setting, $key) {
86  $this->assertSame($key, $k);
87  $this->assertSame($convert, $select($marshal));
88  return $setting;
89  });
90 
91  $this->assertSame($setting, (new Settings($settings))->$method());
92  }
ilSetting $setting
Definition: class.ilias.php:68
+ Here is the caller graph for this function:

◆ testAdminEmail()

ILIAS\DataProtection\test\SettingsTest::testAdminEmail ( )

Definition at line 57 of file SettingsTest.php.

References ILIAS\DataProtection\test\SettingsTest\assertSelect().

57  : void
58  {
59  $this->assertSelect('adminEmail', 'admin_email', 'string');
60  }
assertSelect(string $method, string $key, string $type)
+ Here is the call graph for this function:

◆ testAuthMode()

ILIAS\DataProtection\test\SettingsTest::testAuthMode ( )

Definition at line 62 of file SettingsTest.php.

References ILIAS\DataProtection\test\SettingsTest\assertSelect().

62  : void
63  {
64  $this->assertSelect('authMode', 'auth_mode', 'string');
65  }
assertSelect(string $method, string $key, string $type)
+ Here is the call graph for this function:

◆ testConstruct()

ILIAS\DataProtection\test\SettingsTest::testConstruct ( )

Definition at line 37 of file SettingsTest.php.

37  : void
38  {
39  $this->assertInstanceOf(Settings::class, new Settings($this->mock(SelectSetting::class)));
40  }

◆ testDeleteUserOnWithdrawal()

ILIAS\DataProtection\test\SettingsTest::testDeleteUserOnWithdrawal ( )

Definition at line 52 of file SettingsTest.php.

References ILIAS\DataProtection\test\SettingsTest\assertSelect().

52  : void
53  {
54  $this->assertSelect('deleteUserOnWithdrawal', 'dpro_withdrawal_usr_deletion', 'boolean');
55  }
assertSelect(string $method, string $key, string $type)
+ Here is the call graph for this function:

◆ testEnabled()

ILIAS\DataProtection\test\SettingsTest::testEnabled ( )

Definition at line 42 of file SettingsTest.php.

References ILIAS\DataProtection\test\SettingsTest\assertSelect().

42  : void
43  {
44  $this->assertSelect('enabled', 'dpro_enabled', 'boolean');
45  }
assertSelect(string $method, string $key, string $type)
+ Here is the call graph for this function:

◆ testLastResetDate()

ILIAS\DataProtection\test\SettingsTest::testLastResetDate ( )

Definition at line 67 of file SettingsTest.php.

References ILIAS\DataProtection\test\SettingsTest\assertSelect().

67  : void
68  {
69  $this->assertSelect('lastResetDate', 'dpro_last_reset_date', 'dateTime');
70  }
assertSelect(string $method, string $key, string $type)
+ Here is the call graph for this function:

◆ testNoAcceptance()

ILIAS\DataProtection\test\SettingsTest::testNoAcceptance ( )

Definition at line 72 of file SettingsTest.php.

References ILIAS\DataProtection\test\SettingsTest\assertSelect().

72  : void
73  {
74  $this->assertSelect('noAcceptance', 'dpro_no_acceptance', 'boolean');
75  }
assertSelect(string $method, string $key, string $type)
+ Here is the call graph for this function:

◆ testValidateOnLogin()

ILIAS\DataProtection\test\SettingsTest::testValidateOnLogin ( )

Definition at line 47 of file SettingsTest.php.

References ILIAS\DataProtection\test\SettingsTest\assertSelect().

47  : void
48  {
49  $this->assertSelect('validateOnLogin', 'dpro_validate_on_login', 'boolean');
50  }
assertSelect(string $method, string $key, string $type)
+ Here is the call graph for this function:

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