Skip to content

Commit cec8ba5

Browse files
sreichelkiatng
andauthored
PHPUnit: fixed test using wrong date format (OpenMage#4444)
* bumped version * fixed cs-phpunit * revert version change [skip ci] --------- Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
1 parent db20784 commit cec8ba5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.phpcs.dist.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@
145145
<exclude name="Squiz.PHP.Eval.Discouraged"/>
146146
</rule>
147147

148-
<rule ref="PHPCompatibility" />
148+
<rule ref="PHPCompatibility">
149+
<exclude name="PHPCompatibility.Keywords.ForbiddenNamesAsDeclared.resourceFound"/>
150+
</rule>
149151
<rule ref="PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore">
150152
<exclude-pattern>*/Varien/Object.php*</exclude-pattern>
151153
<exclude-pattern>*/Varien/Data/Form/Abstract.php*</exclude-pattern>

tests/unit/Mage/Core/Helper/DataTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ public function testFormatTimezoneDate(
9393
public function provideFormatTimezoneDate(): Generator
9494
{
9595
$date = date_create()->getTimestamp();
96-
$dateShort = date('m/j/Y', $date);
96+
$dateShort = date('n/j/Y', $date);
9797
$dateLong = date('F j, Y', $date);
98-
$dateShortTime = date('m/j/Y g:i A', $date);
98+
$dateShortTime = date('n/j/Y g:i A', $date);
9999

100100
yield 'null' => [
101101
$dateShort,

0 commit comments

Comments
 (0)