◆ testFailCreateWithInvalidDeadlinePeriod()
ilStudyProgrammeDeadlineSettingsTest::testFailCreateWithInvalidDeadlinePeriod |
( |
| ) |
|
◆ testFailWithDeadlinePeriod()
ilStudyProgrammeDeadlineSettingsTest::testFailWithDeadlinePeriod |
( |
| ) |
|
◆ testSuccessfulCreate()
ilStudyProgrammeDeadlineSettingsTest::testSuccessfulCreate |
( |
| ) |
|
Definition at line 32 of file ilStudyProgrammeDeadlineSettingsTest.php.
35 self::VALID_DEADLINE_PERIOD_1,
39 $this->assertEquals(self::VALID_DEADLINE_PERIOD_1, $obj->getDeadlinePeriod());
40 $this->assertEquals(self::VALID_DEADLINE_DATE, $obj->getDeadlineDate()->format(
'Y-m-d'));
◆ testSuccessfulWithDeadlinePeriod()
ilStudyProgrammeDeadlineSettingsTest::testSuccessfulWithDeadlinePeriod |
( |
| ) |
|
Definition at line 56 of file ilStudyProgrammeDeadlineSettingsTest.php.
59 self::VALID_DEADLINE_PERIOD_1,
63 $new = $obj->withDeadlinePeriod(self::VALID_DEADLINE_PERIOD_2);
65 $this->assertEquals(self::VALID_DEADLINE_PERIOD_1, $obj->getDeadlinePeriod());
66 $this->assertEquals(self::VALID_DEADLINE_PERIOD_2, $new->getDeadlinePeriod());
◆ testToFormInput()
ilStudyProgrammeDeadlineSettingsTest::testToFormInput |
( |
| ) |
|
Definition at line 84 of file ilStudyProgrammeDeadlineSettingsTest.php.
References Vendor\Package\$f, ILIAS\UI\Implementation\Component\Input\$inputs, $lng, ILIAS\UI\examples\Layout\Page\Standard\$refinery, and $txt.
86 $lng = $this->createMock(ilLanguage::class);
99 self::VALID_DEADLINE_PERIOD_1,
103 $lng_consecutive_calls = [];
104 $lng->expects($this->atLeastOnce())
106 ->willReturnCallback(
107 function (
$txt) use (&$lng_consecutive_calls) {
108 $lng_consecutive_calls[] =
$txt;
113 $expected_consecutive_calls = [
115 'prg_deadline_period_label',
116 'prg_deadline_period_desc',
117 'prg_deadline_period',
118 'prg_deadline_date_label',
119 'prg_deadline_date_desc',
121 'prg_deadline_settings' 124 $field = $obj->toFormInput(
131 $this->assertEquals($expected_consecutive_calls, $lng_consecutive_calls);
133 $switchable_group = $field->getInputs()[
'prg_deadline'];
134 $this->assertInstanceOf(
135 SwitchableGroup::class,
139 $date_value = $switchable_group->getValue()[1][
'deadline_date'];
141 $this->assertEquals(self::VALID_DEADLINE_DATE, $date);
143 $inputs = $switchable_group->getInputs();
145 $this->assertInstanceOf(
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ INVALID_DEADLINE_PERIOD
const ilStudyProgrammeDeadlineSettingsTest::INVALID_DEADLINE_PERIOD = -1 |
|
private |
◆ VALID_DEADLINE_DATE
const ilStudyProgrammeDeadlineSettingsTest::VALID_DEADLINE_DATE = '2019-02-14' |
|
private |
◆ VALID_DEADLINE_PERIOD_1
const ilStudyProgrammeDeadlineSettingsTest::VALID_DEADLINE_PERIOD_1 = 11 |
|
private |
◆ VALID_DEADLINE_PERIOD_2
const ilStudyProgrammeDeadlineSettingsTest::VALID_DEADLINE_PERIOD_2 = 22 |
|
private |
The documentation for this class was generated from the following file: