Skip to content

Commit

Permalink
correct mistake in test: getCodes() takes four parameters and the sec…
Browse files Browse the repository at this point in the history
…ond parameter must be startDate as timestamp, not ADVANCE_GENERATION_DAYS. This correction should not change behavior, because the wrong parameter was treated just like a call with one parameter and defaults for the last three.
  • Loading branch information
nelarsen committed Jan 15, 2024
1 parent 9169454 commit c073014
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 @@ -162,7 +162,7 @@ public function testGetCodes() {
BookingCodes::generate( $this->timeframeWithoutEndDate, self::ADVANCE_GENERATION_DAYS );
//now we should get all codes for the max generation days
$codeAmount = BookingCodes::ADVANCE_GENERATION_DAYS + 2; // (timeframe begins yesterday): yesterday + today + ADVANCE_GENERATION_DAYS
$codes = BookingCodes::getCodes( $this->timeframeWithoutEndDate->ID, self::ADVANCE_GENERATION_DAYS);
$codes = BookingCodes::getCodes( $this->timeframeWithoutEndDate->ID );
$this->assertNotEmpty( $codes );
$this->assertCount( $codeAmount, $codes );
//check that the codes are in the correct order
Expand Down

0 comments on commit c073014

Please sign in to comment.