Skip to content

Commit

Permalink
PHPUnit: fixed test using wrong date format (#4444)
Browse files Browse the repository at this point in the history
* bumped version

* fixed cs-phpunit

* revert version change [skip ci]

---------

Co-authored-by: Ng Kiat Siong <[email protected]>
  • Loading branch information
sreichel and kiatng authored Jan 6, 2025
1 parent db20784 commit cec8ba5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .phpcs.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@
<exclude name="Squiz.PHP.Eval.Discouraged"/>
</rule>

<rule ref="PHPCompatibility" />
<rule ref="PHPCompatibility">
<exclude name="PHPCompatibility.Keywords.ForbiddenNamesAsDeclared.resourceFound"/>
</rule>
<rule ref="PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore">
<exclude-pattern>*/Varien/Object.php*</exclude-pattern>
<exclude-pattern>*/Varien/Data/Form/Abstract.php*</exclude-pattern>
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Mage/Core/Helper/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ public function testFormatTimezoneDate(
public function provideFormatTimezoneDate(): Generator
{
$date = date_create()->getTimestamp();
$dateShort = date('m/j/Y', $date);
$dateShort = date('n/j/Y', $date);
$dateLong = date('F j, Y', $date);
$dateShortTime = date('m/j/Y g:i A', $date);
$dateShortTime = date('n/j/Y g:i A', $date);

yield 'null' => [
$dateShort,
Expand Down

0 comments on commit cec8ba5

Please sign in to comment.