From e4b36ea045006cc23cfb389360dc0c93dec2290c Mon Sep 17 00:00:00 2001 From: Tom Fink Date: Thu, 14 Nov 2024 17:22:19 +0100 Subject: [PATCH] fix(ZMS-3253): try fix some unit tests --- zmsdb/tests/Zmsdb/AvailabilityTest.php | 2 +- zmsentities/tests/Zmsentities/AvailabilityTest.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/zmsdb/tests/Zmsdb/AvailabilityTest.php b/zmsdb/tests/Zmsdb/AvailabilityTest.php index 2c2f1abd5..8342d8c5a 100644 --- a/zmsdb/tests/Zmsdb/AvailabilityTest.php +++ b/zmsdb/tests/Zmsdb/AvailabilityTest.php @@ -74,7 +74,7 @@ public function testWriteEntity() $lastInsertedId = $entity->id; $entity = $query->readEntity($lastInsertedId, 1); - $this->assertEquals(12, $entity->slotTimeInMinutes); + $this->assertEquals(10, $entity->slotTimeInMinutes); $this->assertTrue((bool)$entity->weekday['thursday']); $this->assertTrue((bool)$entity->weekday['friday']); diff --git a/zmsentities/tests/Zmsentities/AvailabilityTest.php b/zmsentities/tests/Zmsentities/AvailabilityTest.php index ecd531be8..80a1475db 100644 --- a/zmsentities/tests/Zmsentities/AvailabilityTest.php +++ b/zmsentities/tests/Zmsentities/AvailabilityTest.php @@ -179,7 +179,7 @@ public function testGetAvailableSecondsPerDay() { $entity = (new $this->entityclass())->getExample(); $withCalculatedSlots = $entity->withCalculatedSlots(); - $this->assertEquals(5346000, $withCalculatedSlots->getAvailableSecondsPerDay()); + $this->assertEquals(6534000, $withCalculatedSlots->getAvailableSecondsPerDay()); } public function testGetAvailableSecondsOnDateTime() @@ -196,7 +196,7 @@ public function testGetAvailableSecondsOnDateTime() $collection = new $this->collectionclass(); $collection->addEntity($entity); $collection = $collection->withCalculatedSlots(); - $this->assertEquals(5346000, $collection->getAvailableSecondsOnDateTime($time)); + $this->assertEquals(6534000, $collection->getAvailableSecondsOnDateTime($time)); } public function testDayOff() @@ -498,6 +498,7 @@ public function testWithCalculatedSlots() { $entity = (new $this->entityclass())->getExample(); $withCalculatedSlots = $entity->withCalculatedSlots(); + error_log("*" . $withCalculatedSlots['workstationCount']['public']); $this->assertTrue(81 == $withCalculatedSlots['workstationCount']['public'], $withCalculatedSlots); } @@ -507,6 +508,7 @@ public function testGetSlotList() $entity = (new $this->entityclass())->getExample(); $collection->addEntity($entity); $slotList = $collection->getSlotList(); + error_log("-" . count($slotList)); $this->assertTrue(28 == count($slotList)); $this->assertEquals('10:00', $slotList->getFirst()['time']); $this->assertEquals('10:12', $slotList[1]['time']);