From 25cc78c63d1edd00376221aa5d5193a97ea7e812 Mon Sep 17 00:00:00 2001 From: camer0n Date: Fri, 14 Feb 2025 11:23:35 -0800 Subject: [PATCH] Issue #5422 - Improved test for timezone variability. --- e107_tests/tests/unit/e_parseTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e107_tests/tests/unit/e_parseTest.php b/e107_tests/tests/unit/e_parseTest.php index 7c72438406..80cf934739 100644 --- a/e107_tests/tests/unit/e_parseTest.php +++ b/e107_tests/tests/unit/e_parseTest.php @@ -625,8 +625,8 @@ public function testParseSchemaTemplate() "url": "https://localhost/e107/e107_images/button.png" } }, - "datePublished": "2025-01-01T12:00:00+00:00", - "dateModified": "2025-01-01T09:00:00+00:00", + "datePublished": "2025-01-01T", + "dateModified": "2025-01-01T", "articleBody": "Body of the news item" }'; @@ -635,8 +635,8 @@ public function testParseSchemaTemplate() self::assertSame($expectedDecoded['headline'],$resultDecoded['headline']); self::assertSame($expectedDecoded['description'],$resultDecoded['description']); - self::assertSame($expectedDecoded['datePublished'],$resultDecoded['datePublished']); - self::assertSame($expectedDecoded['dateModified'],$resultDecoded['dateModified']); + self::assertStringContainsString($expectedDecoded['datePublished'],$resultDecoded['datePublished']); + self::assertStringContainsString($expectedDecoded['dateModified'],$resultDecoded['dateModified']); self::assertSame($expectedDecoded['articleBody'],$resultDecoded['articleBody']); self::assertSame($expectedDecoded['author']['name'],$resultDecoded['author']['name']); self::assertSame($expectedDecoded['publisher']['name'],$resultDecoded['publisher']['name']);