From eddf9bd9979601c890f937ce15455d5068be82b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 22 Jul 2024 19:55:10 +0200 Subject: [PATCH] tests: Normalize timestamp values returned by different database engines Bug: T370671 Change-Id: Icfccbe7543e1bbcf6447a05c23c0dbfeac3df649 --- tests/phpunit/ThreadItemStoreTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/ThreadItemStoreTest.php b/tests/phpunit/ThreadItemStoreTest.php index ea7569de9..857da6377 100644 --- a/tests/phpunit/ThreadItemStoreTest.php +++ b/tests/phpunit/ThreadItemStoreTest.php @@ -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; } }