Skip to content

Commit 0fedb3f

Browse files
committed
Fix date formatting in deterministic ordering test to ensure consistent post creation. Updated post_date to use str_pad for zero-padding single-digit days.
1 parent d7b7c74 commit 0fedb3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/phpunit/tests/query/deterministicOrdering.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function test_deterministic_ordering_with_post_title() {
9292
$post_ids[] = self::factory()->post->create(
9393
array(
9494
'post_title' => $identical_title,
95-
'post_date' => "2023-01-0$i 10:00:00",
95+
'post_date' => "2023-01-" . str_pad((string) $i, 2, '0', STR_PAD_LEFT) . " 10:00:00",
9696
)
9797
);
9898
}

0 commit comments

Comments
 (0)