From f0baeeef47713c9e7fbfd23de345dd8b425bfb4e Mon Sep 17 00:00:00 2001 From: ashraf Date: Fri, 10 Jan 2025 15:11:36 +0100 Subject: [PATCH] OXDEV-8498 Drop DateFormatHelper --- CHANGELOG-8.0.md | 3 +- .../TemplateLogic/DateFormatHelper.php | 35 ----------- .../Adapter/TemplateLogic/services.yaml | 3 - .../TemplateLogic/DateFormatHelperTest.php | 62 ------------------- 4 files changed, 2 insertions(+), 101 deletions(-) delete mode 100644 source/Internal/Transition/Adapter/TemplateLogic/DateFormatHelper.php delete mode 100644 tests/Integration/Internal/Transition/Adapter/TemplateLogic/DateFormatHelperTest.php diff --git a/CHANGELOG-8.0.md b/CHANGELOG-8.0.md index f470862e7a..f5acd59ba9 100644 --- a/CHANGELOG-8.0.md +++ b/CHANGELOG-8.0.md @@ -64,4 +64,5 @@ - Deprecated `handleDatabaseException` functionality - Dependency on `oxideshop-facts` component - `FileCache` and `SubShopSpecificFileCache` classes. Use `ContextInterface::getCurrentShopId()` instead -- Legacy file-based caching methods from `Utils` class \ No newline at end of file +- Legacy file-based caching methods from `Utils` class +- Remove `DateFormatHelper` \ No newline at end of file diff --git a/source/Internal/Transition/Adapter/TemplateLogic/DateFormatHelper.php b/source/Internal/Transition/Adapter/TemplateLogic/DateFormatHelper.php deleted file mode 100644 index b399fc5e94..0000000000 --- a/source/Internal/Transition/Adapter/TemplateLogic/DateFormatHelper.php +++ /dev/null @@ -1,35 +0,0 @@ -fixWindowsTimeFormat($format, $timestamp); - - $this->assertEquals($expectedFormat, $actualFormat); - } - - public function testFixWindowsTimeFormatWithDay(): void - { - $someTimestamp = 691200; - $dayWithoutZero = date('j', $someTimestamp); - - $actualFormat = (new DateFormatHelper())->fixWindowsTimeFormat('%e', $someTimestamp); - - $this->assertEquals(" $dayWithoutZero", $actualFormat); - } - - public function testFixWindowsTimeFormatWithHour(): void - { - $someTimestamp = 46800; - $hourWithoutZero = date('g', $someTimestamp); - - $actualFormat = (new DateFormatHelper())->fixWindowsTimeFormat('%l', $someTimestamp); - - $this->assertEquals(" $hourWithoutZero", $actualFormat); - } - - public function testFixWindowsTimeFormatWithNonTimeString(): void - { - $actualFormat = (new DateFormatHelper())->fixWindowsTimeFormat('foo', ''); - - $this->assertEquals('foo', $actualFormat); - } -}