Definition at line 33 of file UserSettingsTest.php.
◆ testAgreeDate()
ILIAS\DataProtection\test\UserSettingsTest::testAgreeDate |
( |
| ) |
|
Definition at line 59 of file UserSettingsTest.php.
References ILIAS\$setting.
61 $setting = $this->mock(Setting::class);
62 $convert = $this->mock(Convert::class);
64 $date = $this->mock(Convert::class);
66 $marshal = $this->mockMethod(Marshal::class,
'nullable', [$date], $convert);
67 $marshal->expects(self::once())->method(
'dateTime')->willReturn($date);
69 $settings = $this->mock(SelectSetting::class);
70 $settings->expects(self::once())->method(
'typed')->willReturnCallback(
function (
string $key, callable $select) use ($marshal, $convert,
$setting) {
71 $this->assertSame(
'dpro_agree_date', $key);
72 $this->assertSame($convert, $select($marshal));
76 $this->assertSame(
$setting, (
new UserSettings($settings))->agreeDate());
◆ testConstruct()
ILIAS\DataProtection\test\UserSettingsTest::testConstruct |
( |
| ) |
|
Definition at line 37 of file UserSettingsTest.php.
39 $this->assertInstanceOf(UserSettings::class,
new UserSettings($this->mock(SelectSetting::class)));
◆ testWithdrawalRequested()
ILIAS\DataProtection\test\UserSettingsTest::testWithdrawalRequested |
( |
| ) |
|
Definition at line 42 of file UserSettingsTest.php.
References ILIAS\$setting.
44 $setting = $this->mock(Setting::class);
45 $convert = $this->mock(Convert::class);
47 $marshal = $this->mockMethod(Marshal::class,
'boolean', [], $convert);
49 $settings = $this->mock(SelectSetting::class);
50 $settings->expects(self::once())->method(
'typed')->willReturnCallback(
function (
string $key, callable $select) use ($marshal, $convert,
$setting) {
51 $this->assertSame(
'dpro_withdrawal_requested', $key);
52 $this->assertSame($convert, $select($marshal));
56 $this->assertSame(
$setting, (
new UserSettings($settings))->withdrawalRequested());
The documentation for this class was generated from the following file: