Skip to content

Commit

Permalink
test: fix flaky test with new date
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Jan 27, 2025
1 parent 0012313 commit 49c4c93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Client/Http/RequestFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function testParamParsed(): void
new Psr17Factory(),
);

$now = new DateTimeImmutable();
$nowDate = $now->format('Y-m-d');

$request = $requestFactory->prepareSqlRequest(
'SELECT {p1:String}, {p_2:Date}',
new RequestSettings(
Expand All @@ -87,7 +90,7 @@ public function testParamParsed(): void
new RequestOptions(
[
'p1' => 'value1',
'p_2' => new DateTimeImmutable(),
'p_2' => $now,
],
),
);
Expand All @@ -101,7 +104,7 @@ public function testParamParsed(): void
'Content-Disposition: form-data; name="param_p_2"',
'Content-Length: 10',
'',
'2025-01-23',
$nowDate,
],
),
$body,
Expand Down

0 comments on commit 49c4c93

Please sign in to comment.