tests: Normalize timestamp values returned by different database engines

Bug: T370671
Change-Id: Icfccbe7543e1bbcf6447a05c23c0dbfeac3df649
This commit is contained in:
Bartosz Dziewoński 2024-07-22 19:55:10 +02:00
parent a6ff28eaf0
commit eddf9bd997

View file

@ -75,6 +75,10 @@ class ThreadItemStoreTest extends IntegrationTestCase {
->fetchResultSet();
foreach ( $res as $i => $row ) {
foreach ( $row as $key => $val ) {
if ( $key === 'it_timestamp' ) {
// Normalize timestamp values returned by different database engines (T370671)
$val = wfTimestampOrNull( TS_MW, $val );
}
$actual[$table][$i][$key] = $val;
}
}