From 476d5dceb272e897e93e6c64f0990f351cc729c8 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 30 Jan 2023 11:31:49 +0100 Subject: Skip tests that cannot succeed on 32bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason a timestamp in the past also triggers the PHP error about not being able to represent it as an int, so skipping that test on 32bits. Signed-off-by: Côme Chilliet --- apps/dav/tests/unit/CalDAV/CalDavBackendTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index b39f5909919..69096d0cfbb 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -652,8 +652,15 @@ EOS; * @dataProvider providesCalDataForGetDenormalizedData */ public function testGetDenormalizedData($expected, $key, $calData): void { - $actual = $this->backend->getDenormalizedData($calData); - $this->assertEquals($expected, $actual[$key]); + try { + $actual = $this->backend->getDenormalizedData($calData); + $this->assertEquals($expected, $actual[$key]); + } catch (\ValueError $e) { + if (($e->getMessage() === 'Epoch doesn\'t fit in a PHP integer') && (PHP_INT_SIZE < 8)) { + $this->markTestSkipped('This fail on 32bits because of PHP limitations in DateTime'); + } + throw $e; + } } public function providesCalDataForGetDenormalizedData() { -- cgit v1.2.3