Skip to content

Commit

Permalink
Fix ICU lib version specific failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Sep 8, 2024
1 parent f727328 commit 73629d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/TestCase/View/Helper/CrudViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ public function testFormatDateTime(): void
$dateTime = new Time('14:00:00');

$result = $this->CrudView->formatDateTime('field', $dateTime, []);
$this->assertEquals('2:00PM', $result);
$this->assertEquals('2:00 PM', str_replace('', ' ', $result));

Time::setToStringFormat('KK:mm:ss a');
$result = $this->CrudView->formatDateTime('field', $dateTime, []);
$this->assertEquals('02:00:00 PM', $result);

$dateTime = new DateTime('2021-01-20 14:00:00');
$result = $this->CrudView->formatDateTime('field', $dateTime, []);
$this->assertEquals('1/20/21, 2:00PM', $result);
$this->assertEquals('1/20/21, 2:00 PM', str_replace('', ' ', $result));
}
}

0 comments on commit 73629d6

Please sign in to comment.