@@ -276,7 +276,7 @@ public function testNoChangeIntegration()
276
276
{
277
277
$ availability = $ this ->readTestAvailability ();
278
278
$ now = (new Slot ())->readLastChangedTimeByAvailability ($ availability );
279
- $ status = (new Slot ())->writeByAvailability ($ availability , $ now );
279
+ $ status = (new Slot ())->writeByAvailability ($ availability , $ now, $ now );
280
280
$ this ->assertFalse ($ status , "Availability should not rebuild slots without change " );
281
281
}
282
282
@@ -286,7 +286,7 @@ public function testChangedScopeIntegration()
286
286
$ availability ->scope ['preferences ' ]['appointment ' ]['endInDaysDefault ' ] = 63 ;
287
287
$ availability ->scope = (new \BO \Zmsdb \Scope ())->updateEntity ($ availability ->scope ->id , $ availability ->scope , 1 );
288
288
$ now = (new Slot ())->readLastChangedTimeByAvailability ($ availability );
289
- $ status = (new Slot ())->writeByAvailability ($ availability , $ now );
289
+ $ status = (new Slot ())->writeByAvailability ($ availability , $ now, $ now );
290
290
//$this->debugOutdated($availability, $now, $now->modify('-1 hour'));
291
291
$ this ->assertFalse (!$ status , "Availability should rebuild slots on changed scope " );
292
292
}
@@ -315,21 +315,21 @@ public function testChangeOnCancel()
315
315
$ lastChange ->format ('Y-m-d H:i:s ' ),
316
316
"readLastChangedTimeByAvailability should not return cancelled slots "
317
317
);
318
- $ status = (new Slot ())->writeByAvailability ($ availability , $ now );
318
+ $ status = (new Slot ())->writeByAvailability ($ availability , $ now, $ now );
319
319
$ this ->assertFalse (!$ status , "Availability should rebuild slots if newer " );
320
320
}
321
321
322
322
public function testChangeByTimeIntegration ()
323
323
{
324
324
$ availability = $ this ->readTestAvailability ();
325
325
$ lastChange = (new Slot ())->readLastChangedTimeByAvailability ($ availability );
326
- $ status = (new Slot ())->writeByAvailability ($ availability , static ::$ now );
326
+ $ status = (new Slot ())->writeByAvailability ($ availability , static ::$ now, static :: $ now );
327
327
//$this->debugOutdated($availability, $now, $lastChange);
328
328
$ availability = $ this ->readTestAvailability ();
329
329
$ now = (new Slot ())->readLastChangedTimeByAvailability ($ availability );
330
330
$ lastChange = $ now ;
331
331
$ now = $ now ->modify ('+1 day ' );
332
- $ status = (new Slot ())->writeByAvailability ($ availability , $ now );
332
+ $ status = (new Slot ())->writeByAvailability ($ availability , $ now, $ now );
333
333
//$this->debugOutdated($availability, $now, $lastChange);
334
334
335
335
$ this ->assertFalse (!$ status , "Availability should rebuild slots if time allows new slots " );
@@ -463,7 +463,7 @@ public function testChangeOnCancelSameDay()
463
463
$ this ->assertEquals ('cancelled ' , $ cancelledSlots [0 ]['status ' ], "Slots should be cancelled before the cancellation time " );
464
464
465
465
// Verify we don't rebuild slots
466
- $ status = (new Slot ())->writeByAvailability ($ availability , $ now );
466
+ $ status = (new Slot ())->writeByAvailability ($ availability , $ now, $ now );
467
467
$ this ->assertFalse ($ status , "Availability should not rebuild slots when Offen_ab=0 Offen_bis=0 and slots are cancelled " );
468
468
469
469
// Verify slots remain cancelled
@@ -505,7 +505,7 @@ public function testChangeOnCancelDifferentDay()
505
505
$ lastChange ->format ('Y-m-d H:i:s ' ),
506
506
"readLastChangedTimeByAvailability should not return cancelled slots "
507
507
);
508
- $ status = (new Slot ())->writeByAvailability ($ availability , $ now );
508
+ $ status = (new Slot ())->writeByAvailability ($ availability , $ now, $ now );
509
509
$ this ->assertFalse ($ status , "Availability should not rebuild slots when cancellation is not on same day as Offen_ab=0 Offen_bis=0 " );
510
510
}
511
511
0 commit comments