Skip to content

Commit

Permalink
I believe the unit test is wrong (even if it would no cause any real …
Browse files Browse the repository at this point in the history
…world problems to be off by one here) because the timeframe begins yesterday, not today.
  • Loading branch information
nelarsen committed Jan 14, 2024
1 parent 88568d7 commit 9169454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/php/Repository/BookingCodesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function testGetCodes() {
//test infinite booking days timeframes
BookingCodes::generate( $this->timeframeWithoutEndDate, self::ADVANCE_GENERATION_DAYS );
//now we should get all codes for the max generation days
$codeAmount = BookingCodes::ADVANCE_GENERATION_DAYS + 1;
$codeAmount = BookingCodes::ADVANCE_GENERATION_DAYS + 2; // (timeframe begins yesterday): yesterday + today + ADVANCE_GENERATION_DAYS
$codes = BookingCodes::getCodes( $this->timeframeWithoutEndDate->ID, self::ADVANCE_GENERATION_DAYS);
$this->assertNotEmpty( $codes );
$this->assertCount( $codeAmount, $codes );
Expand Down

0 comments on commit 9169454

Please sign in to comment.