5 declare(strict_types=1);
23 self::VALID_SEND_REASSIGNED_MAIL_1,
24 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
25 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
29 self::VALID_SEND_REASSIGNED_MAIL_1,
30 $obj->getSendReAssignedMail()
34 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
35 $obj->getReminderNotRestartedByUserDays()
39 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1,
40 $obj->getProcessingEndsNotSuccessfulDays()
48 self::VALID_SEND_REASSIGNED_MAIL_1,
49 self::INVALID_REMINDER_NOT_RESTARTED_BY_USER,
50 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
52 $this->assertTrue(
false);
54 $this->assertTrue(
true);
62 self::VALID_SEND_REASSIGNED_MAIL_1,
63 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
64 self::INVALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS
66 $this->assertTrue(
false);
68 $this->assertTrue(
true);
75 self::VALID_SEND_REASSIGNED_MAIL_1,
76 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
77 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
80 $new = $obj->withSendReAssignedMail(
81 self::VALID_SEND_REASSIGNED_MAIL_2
85 self::VALID_SEND_REASSIGNED_MAIL_1,
86 $obj->getSendReAssignedMail()
90 self::VALID_SEND_REASSIGNED_MAIL_2,
91 $new->getSendReAssignedMail()
98 self::VALID_SEND_REASSIGNED_MAIL_1,
99 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
100 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
103 $new = $obj->withReminderNotRestartedByUserDays(
104 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_2
108 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
109 $obj->getReminderNotRestartedByUserDays()
113 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_2,
114 $new->getReminderNotRestartedByUserDays()
121 self::VALID_SEND_REASSIGNED_MAIL_1,
122 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
123 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
126 $obj->withReminderNotRestartedByUserDays(self::INVALID_REMINDER_NOT_RESTARTED_BY_USER);
127 $this->assertTrue(
false);
129 $this->assertTrue(
true);
136 self::VALID_SEND_REASSIGNED_MAIL_1,
137 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
138 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
141 $new = $obj->withProcessingEndsNotSuccessfulDays(
142 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_2
146 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1,
147 $obj->getProcessingEndsNotSuccessfulDays()
151 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_2,
152 $new->getProcessingEndsNotSuccessfulDays()
159 self::VALID_SEND_REASSIGNED_MAIL_1,
160 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
161 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
164 $obj->withProcessingEndsNotSuccessfulDays(
165 self::INVALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS
167 $this->assertTrue(
false);
169 $this->assertTrue(
true);
173 public function testToFormInput() :
void 175 $lng = $this->createMock(ilLanguage::class);
187 self::VALID_SEND_REASSIGNED_MAIL_1,
188 self::VALID_REMINDER_NOT_RESTARTED_BY_USER_1,
189 self::VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1
192 $lng->expects($this->atLeastOnce())
195 [
'send_re_assigned_mail'],
196 [
'send_re_assigned_mail_info'],
197 [
'prg_user_not_restarted_time_input'],
198 [
'prg_user_not_restarted_time_input_info'],
199 [
'send_info_to_re_assign_mail'],
200 [
'send_info_to_re_assign_mail_info'],
201 [
'prg_processing_ends_no_success'],
202 [
'prg_processing_ends_no_success_info'],
203 [
'send_risky_to_fail_mail'],
204 [
'send_risky_to_fail_mail_info'],
205 [
'prg_cron_job_configuration']
207 ->will($this->onConsecutiveCalls(
208 'send_re_assigned_mail',
209 'send_re_assigned_mail_info',
210 'prg_user_not_restarted_time_input',
211 'prg_user_not_restarted_time_input_info',
212 'send_info_to_re_assign_mail',
213 'send_info_to_re_assign_mail_info',
214 'prg_processing_ends_no_success',
215 'prg_processing_ends_no_success_info',
216 'send_risky_to_fail_mail',
217 'send_risky_to_fail_mail_info',
218 'prg_cron_job_configuration' 222 $field = $obj->toFormInput(
228 $this->assertInstanceOf(
229 'ILIAS\UI\Implementation\Component\Input\Field\Section',
233 $inputs = $field->getInputs();
234 $cb = $inputs[
'send_re_assigned_mail'];
237 $og_1 = $inputs[
'prg_user_not_restarted_time_input'];
240 $og_2 = $inputs[
'processing_ends_not_success'];
242 $this->assertInstanceOf(
243 'ILIAS\UI\Implementation\Component\Input\Field\Checkbox',
247 $this->assertInstanceOf(
248 'ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup',
252 $this->assertInstanceOf(
253 'ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup',
257 $nm_1 = $og_1->getInputs()[0];
258 $nm_2 = $og_2->getInputs()[0];
260 $this->assertInstanceOf(
261 'ILIAS\UI\Implementation\Component\Input\Field\Numeric',
265 $this->assertInstanceOf(
266 'ILIAS\UI\Implementation\Component\Input\Field\Numeric',
const INVALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS
const VALID_REMINDER_NOT_RESTARTED_BY_USER_1
testFailWithProcessingEndsNotSuccessfulDays()
Class ChatMainBarProvider .
const VALID_SEND_REASSIGNED_MAIL_2
const VALID_SEND_REASSIGNED_MAIL_1
const VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_2
const INVALID_REMINDER_NOT_RESTARTED_BY_USER
testFailCreateWithInvalidReminderNotRestartedByUserDays()
testFailCreateWithInvalidProcessingEndsNotSuccessfulDays()
const VALID_REMINDER_NOT_RESTARTED_BY_USER_2
testSuccessfulWithSendReAssignedMail()
testSuccessfulWithReminderNotRestartedByUserDays()
testSuccessfulWithProcessingEndsNotSuccessfulDays()
testFailWithReminderNotRestartedByUserDays()
const VALID_PROCESSING_ENDS_NOT_SUCCESSFUL_DAYS_1