176 : Generator
177 {
178 yield 'correct configuration' => [
179 'absence_status' => true,
180 'absent_from' => 100,
181 'absent_until' => 100,
182 'result' => true,
183 ];
184
185 yield 'not absent' => [
186 'absence_status' => false,
187 'absent_from' => 100,
188 'absent_until' => 100,
189 'result' => false,
190 ];
191
192 yield 'absent, absent_from is in the future' => [
193 'absence_status' => true,
194 'absent_from' => 100 + 1,
195 'absent_until' => 100,
196 'result' => false,
197 ];
198
199 yield 'absent, absent_until is in the past' => [
200 'absence_status' => true,
201 'absent_from' => 100,
202 'absent_until' => 100 - 1,
203 'result' => false,
204 ];
205
206 yield 'absent, absent_from is in the past, absent_until is in the future' => [
207 'absence_status' => true,
208 'absent_from' => 100 - 1,
209 'absent_until' => 100 + 1,
210 'result' => true,
211 ];
212 }