File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
tests/unit/Mage/Core/Helper Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ public function testValidateKey(): void
78
78
* @dataProvider provideFormatTimezoneDate
79
79
* @group Mage_Core
80
80
* @group Mage_Core_Helper
81
+ * @group Dates
81
82
*/
82
83
public function testFormatTimezoneDate (
83
84
string $ expectedResult ,
@@ -91,27 +92,25 @@ public function testFormatTimezoneDate(
91
92
92
93
public function provideFormatTimezoneDate (): Generator
93
94
{
94
- $ date = strtotime (Varien_Date::formatDate ('2024-10-02 12:00:00 ' ));
95
- $ now = date ('m/j/Y ' , $ date );
96
-
97
- $ dateShort = date ('m/j/Y ' , $ date );
98
- $ dateLong = date ('F j, Y ' , $ date );
99
- $ dateShortTime = date ('m/j/Y h:i A ' , $ date );
95
+ $ date = date_create ()->getTimestamp ();
96
+ $ dateShort = date ('m/j/Y ' , $ date );
97
+ $ dateLong = date ('F j, Y ' , $ date );
98
+ $ dateShortTime = date ('m/j/Y h:i A ' , $ date );
100
99
101
100
yield 'null ' => [
102
- $ now ,
101
+ $ dateShort ,
103
102
null
104
103
];
105
104
yield 'empty date ' => [
106
- $ now ,
105
+ $ dateShort ,
107
106
''
108
107
];
109
108
yield 'string date ' => [
110
- $ now ,
109
+ $ dateShort ,
111
110
'now '
112
111
];
113
112
yield 'numeric date ' => [
114
- $ now ,
113
+ $ dateShort ,
115
114
'0 '
116
115
];
117
116
yield 'invalid date ' => [
You can’t perform that action at this time.
0 commit comments