84 : void
85 {
86 $lng = $this->createMock(ilLanguage::class);
89
93 $df,
96 );
97
99 self::VALID_DEADLINE_PERIOD_1,
100 new DateTimeImmutable(self::VALID_DEADLINE_DATE)
101 );
102
103 $lng->expects($this->atLeastOnce())
104 ->method('txt')
105 ->withConsecutive(
106 ['prg_no_deadline'],
107 ['prg_deadline_period_label'],
108 ['prg_deadline_period_desc'],
109 ['prg_deadline_period'],
110 ['prg_deadline_date_label'],
111 ['prg_deadline_date_desc'],
112 ['prg_deadline_date'],
113 ['prg_deadline_settings']
114 )
115 ->will($this->onConsecutiveCalls(
116 'prg_no_deadline',
117 'prg_deadline_period_label',
118 'prg_deadline_period_desc',
119 'prg_deadline_period',
120 'prg_deadline_date_label',
121 'prg_deadline_date_desc',
122 'prg_deadline_date',
123 'prg_deadline_settings'
124 ))
125 ;
126
127 $field = $obj->toFormInput(
131 $df
132 );
133
134 $switchable_group = $field->getInputs()['prg_deadline'];
135 $this->assertInstanceOf(
136 SwitchableGroup::class,
137 $switchable_group
138 );
139
140 $date_value = $switchable_group->getValue()[1]['deadline_date'];
141 $date = (new DateTimeImmutable($date_value))->format('Y-m-d');
142 $this->assertEquals(self::VALID_DEADLINE_DATE, $date);
143
144 $inputs = $switchable_group->getInputs();
146 $this->assertInstanceOf(
147 Group::class,
148 $input
149 );
150 }
151 }
Refinery Factory $refinery
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.