19 declare(strict_types=1);
41 self::VALID_SEND_REASSIGNED_MAIL_1,
42 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
43 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
47 self::VALID_SEND_REASSIGNED_MAIL_1,
48 $obj->getSendReAssignedMail()
52 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
53 $obj->getReminderNotRestartedByUserDays()
57 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1,
58 $obj->getProcessingEndsNotSuccessfulDays()
66 self::VALID_SEND_REASSIGNED_MAIL_1,
67 self::INVALID_REMINDER_NOT_RESTARTED_BY_USER,
68 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
72 $this->assertTrue(
true);
80 self::VALID_SEND_REASSIGNED_MAIL_1,
81 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
82 self::INVALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS
86 $this->assertTrue(
true);
93 self::VALID_SEND_REASSIGNED_MAIL_1,
94 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
95 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
98 $new = $obj->withSendReAssignedMail(
99 self::VALID_SEND_REASSIGNED_MAIL_2
103 self::VALID_SEND_REASSIGNED_MAIL_1,
104 $obj->getSendReAssignedMail()
108 self::VALID_SEND_REASSIGNED_MAIL_2,
109 $new->getSendReAssignedMail()
116 self::VALID_SEND_REASSIGNED_MAIL_1,
117 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
118 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
121 $new = $obj->withReminderNotRestartedByUserDays(
122 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_2
126 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
127 $obj->getReminderNotRestartedByUserDays()
131 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_2,
132 $new->getReminderNotRestartedByUserDays()
139 self::VALID_SEND_REASSIGNED_MAIL_1,
140 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
141 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
144 $obj->withReminderNotRestartedByUserDays(self::INVALID_REMINDER_NOT_RESTARTED_BY_USER);
147 $this->assertTrue(
true);
154 self::VALID_SEND_REASSIGNED_MAIL_1,
155 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
156 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
159 $new = $obj->withProcessingEndsNotSuccessfulDays(
160 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_2
164 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1,
165 $obj->getProcessingEndsNotSuccessfulDays()
169 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_2,
170 $new->getProcessingEndsNotSuccessfulDays()
177 self::VALID_SEND_REASSIGNED_MAIL_1,
178 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
179 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
182 $obj->withProcessingEndsNotSuccessfulDays(
183 self::INVALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS
187 $this->assertTrue(
true);
191 public function testToFormInput():
void 193 $lng = $this->createMock(ilLanguage::class);
206 self::VALID_SEND_REASSIGNED_MAIL_1,
207 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
208 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
211 $lng_consecutive_calls = [];
212 $lng->expects($this->atLeastOnce())
214 ->willReturnCallback(
215 function (
$txt) use (&$lng_consecutive_calls) {
216 $lng_consecutive_calls[] =
$txt;
221 $expected_consecutive_calls = [
222 'send_re_assigned_mail',
223 'send_re_assigned_mail_info',
224 'prg_user_not_restarted_time_input',
225 'prg_user_not_restarted_time_input_info',
226 'send_info_to_re_assign_mail',
227 'send_info_to_re_assign_mail_info',
228 'prg_processing_ends_no_success',
229 'prg_processing_ends_no_success_info',
230 'send_risky_to_fail_mail',
231 'send_risky_to_fail_mail_info',
232 'prg_cron_job_configuration' 235 $field = $obj->toFormInput(
241 $this->assertEquals($expected_consecutive_calls, $lng_consecutive_calls);
243 $this->assertInstanceOf(
249 $cb =
$inputs[
'send_re_assigned_mail'];
252 $og_1 =
$inputs[
'prg_user_not_restarted_time_input'];
255 $og_2 =
$inputs[
'processing_ends_not_success'];
257 $this->assertInstanceOf(
262 $this->assertInstanceOf(
263 OptionalGroup::class,
267 $this->assertInstanceOf(
268 OptionalGroup::class,
272 $nm_1 = $og_1->getInputs()[0];
273 $nm_2 = $og_2->getInputs()[0];
275 $this->assertInstanceOf(
280 $this->assertInstanceOf(
const INVALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS
const VALID_REMINDER_NOT_RESTARTED_BY_USER_1
testFailWithProcessingEndsNotSuccessfulDays()
Interface Observer Contains several chained tasks and infos about them.
const VALID_SEND_REASSIGNED_MAIL_2
const VALID_SEND_REASSIGNED_MAIL_1
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_2
const INVALID_REMINDER_NOT_RESTARTED_BY_USER
testFailCreateWithInvalidReminderNotRestartedByUserDays()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testFailCreateWithInvalidProcessingEndsNotSuccessfulDays()
const VALID_REMINDER_NOT_RESTARTED_BY_USER_2
testSuccessfulWithSendReAssignedMail()
testSuccessfulWithReminderNotRestartedByUserDays()
testSuccessfulWithProcessingEndsNotSuccessfulDays()
testFailWithReminderNotRestartedByUserDays()
const VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1